pub struct WritableOptionalKeyPath<Root, Value, F>{ /* private fields */ }Implementations§
Source§impl<Root, Value, F> WritableOptionalKeyPath<Root, Value, F>
impl<Root, Value, F> WritableOptionalKeyPath<Root, Value, F>
pub fn new(getter: F) -> Self
pub fn get_mut<'r>(&self, root: &'r mut Root) -> Option<&'r mut Value>
pub fn then<SubValue, G>(
self,
next: WritableOptionalKeyPath<Value, SubValue, G>,
) -> WritableOptionalKeyPath<Root, SubValue, impl for<'r> Fn(&'r mut Root) -> Option<&'r mut SubValue>>where
G: for<'r> Fn(&'r mut Value) -> Option<&'r mut SubValue> + 'static,
F: 'static,
Value: 'static,
pub fn for_box<Target>(
self,
) -> WritableOptionalKeyPath<Root, Target, impl for<'r> Fn(&'r mut Root) -> Option<&'r mut Target> + 'static>where
Value: DerefMut<Target = Target> + 'static,
F: 'static,
pub fn for_arc<Target>(
self,
) -> WritableOptionalKeyPath<Root, Target, impl for<'r> Fn(&'r mut Root) -> Option<&'r mut Target> + 'static>where
Value: DerefMut<Target = Target> + 'static,
F: 'static,
pub fn for_rc<Target>(
self,
) -> WritableOptionalKeyPath<Root, Target, impl for<'r> Fn(&'r mut Root) -> Option<&'r mut Target> + 'static>where
Value: DerefMut<Target = Target> + 'static,
F: 'static,
pub fn for_option<T>() -> WritableOptionalKeyPath<Option<T>, T, impl for<'r> Fn(&'r mut Option<T>) -> Option<&'r mut T>>
Source§impl<Root, Value, F> WritableOptionalKeyPath<Root, Value, F>where
F: for<'r> Fn(&'r mut Root) -> Option<&'r mut Value> + 'static,
Root: Any + 'static,
Value: Any + 'static,
impl<Root, Value, F> WritableOptionalKeyPath<Root, Value, F>where
F: for<'r> Fn(&'r mut Root) -> Option<&'r mut Value> + 'static,
Root: Any + 'static,
Value: Any + 'static,
Sourcepub fn to_partial(self) -> PartialWritableOptionalKeyPath<Root>
pub fn to_partial(self) -> PartialWritableOptionalKeyPath<Root>
Convert to PartialWritableOptionalKeyPath (hides Value type)
Sourcepub fn to_any(self) -> AnyWritableKeyPath
pub fn to_any(self) -> AnyWritableKeyPath
Convert to AnyWritableKeyPath (hides both Root and Value types)
Sourcepub fn to(self) -> PartialWritableOptionalKeyPath<Root>
pub fn to(self) -> PartialWritableOptionalKeyPath<Root>
Convert to PartialWritableOptionalKeyPath (alias for to_partial())
Trait Implementations§
Source§impl<Root: Clone, Value: Clone, F> Clone for WritableOptionalKeyPath<Root, Value, F>
impl<Root: Clone, Value: Clone, F> Clone for WritableOptionalKeyPath<Root, Value, F>
Source§fn clone(&self) -> WritableOptionalKeyPath<Root, Value, F>
fn clone(&self) -> WritableOptionalKeyPath<Root, Value, F>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<Root, Value, F> Freeze for WritableOptionalKeyPath<Root, Value, F>where
F: Freeze,
impl<Root, Value, F> RefUnwindSafe for WritableOptionalKeyPath<Root, Value, F>
impl<Root, Value, F> Send for WritableOptionalKeyPath<Root, Value, F>
impl<Root, Value, F> Sync for WritableOptionalKeyPath<Root, Value, F>
impl<Root, Value, F> Unpin for WritableOptionalKeyPath<Root, Value, F>
impl<Root, Value, F> UnwindSafe for WritableOptionalKeyPath<Root, Value, F>
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