Struct dmat_components::components::input::value_adapters::mutable_t_value_adapter::MutableTValueAdapter
source · pub struct MutableTValueAdapter<T: FromStr + ToString + Clone = String, TSanitizer: Fn(String) -> ValidationResult = fn(_: String) -> ValidationResult> {
pub value: Mutable<T>,
pub sanitizer: Option<TSanitizer>,
}
Fields§
§value: Mutable<T>
§sanitizer: Option<TSanitizer>
Implementations§
source§impl MutableTValueAdapter
impl MutableTValueAdapter
pub fn new_simple<T: FromStr + ToString + Clone>( value: &Mutable<T> ) -> MutableTValueAdapter<T>
pub fn new_with_sanitizer<T: FromStr + ToString + Clone, TSanitizer: Fn(String) -> ValidationResult + 'static>( value: &Mutable<T>, sanitizer: TSanitizer ) -> MutableTValueAdapter<T, TSanitizer>
Trait Implementations§
source§impl Default for MutableTValueAdapter
impl Default for MutableTValueAdapter
source§impl<T: FromStr + ToString + Clone, TSanitizer: Fn(String) -> ValidationResult + 'static> ValueAdapter for MutableTValueAdapter<T, TSanitizer>
impl<T: FromStr + ToString + Clone, TSanitizer: Fn(String) -> ValidationResult + 'static> ValueAdapter for MutableTValueAdapter<T, TSanitizer>
type ValueSignal = Map<MutableSignalCloned<T>, fn(_: T) -> String>
fn get_value_signal(&self) -> Self::ValueSignal
fn set_value(&self, value: String) -> ValidationResult
Auto Trait Implementations§
impl<T, TSanitizer> RefUnwindSafe for MutableTValueAdapter<T, TSanitizer>where TSanitizer: RefUnwindSafe,
impl<T, TSanitizer> Send for MutableTValueAdapter<T, TSanitizer>where T: Send + Sync, TSanitizer: Send,
impl<T, TSanitizer> Sync for MutableTValueAdapter<T, TSanitizer>where T: Send + Sync, TSanitizer: Sync,
impl<T, TSanitizer> Unpin for MutableTValueAdapter<T, TSanitizer>where TSanitizer: Unpin,
impl<T, TSanitizer> UnwindSafe for MutableTValueAdapter<T, TSanitizer>where TSanitizer: UnwindSafe,
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