pub struct Field<R, S> { /* private fields */ }Implementations§
Source§impl<R, S> Field<R, S>
impl<R, S> Field<R, S>
pub fn new( initial_value: Option<R>, value_state: UseStateHandle<Option<R>>, converter: impl Fn(Event) -> R + 'static, validator: impl Fn(R) -> Result<S, String> + 'static, ) -> Self
pub fn is_dirty(&self) -> bool
pub fn value(&self) -> Option<S>
pub fn raw_value(&self) -> R
pub fn has_errors(&self) -> bool
pub fn error(&self) -> Option<String>
pub fn error_str(&self) -> String
pub fn change<V>(&self, callback: Callback<()>) -> impl Fn(V)
pub fn on_change(&self, event: Event)
Trait Implementations§
Auto Trait Implementations§
impl<R, S> Freeze for Field<R, S>where
R: Freeze,
impl<R, S> !RefUnwindSafe for Field<R, S>
impl<R, S> !Send for Field<R, S>
impl<R, S> !Sync for Field<R, S>
impl<R, S> Unpin for Field<R, S>where
R: Unpin,
impl<R, S> !UnwindSafe for Field<R, S>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoPropValue<Option<T>> for T
impl<T> IntoPropValue<Option<T>> for T
Source§fn into_prop_value(self) -> Option<T>
fn into_prop_value(self) -> Option<T>
Convert
self to a value of a Properties struct.Source§impl<T> IntoPropValue<T> for T
impl<T> IntoPropValue<T> for T
Source§fn into_prop_value(self) -> T
fn into_prop_value(self) -> T
Convert
self to a value of a Properties struct.