pub struct KeyPath<Root, Value, F>{ /* private fields */ }Implementations§
Source§impl<Root, Value, F> KeyPath<Root, Value, F>
impl<Root, Value, F> KeyPath<Root, Value, F>
pub fn new(getter: F) -> Self
pub fn get<'r>(&self, root: &'r Root) -> &'r Value
pub fn for_box<Target>(
self,
) -> KeyPath<Root, Target, impl for<'r> Fn(&'r Root) -> &'r Target + 'static>where
Value: Deref<Target = Target> + 'static,
F: 'static,
pub fn for_arc<Target>(
self,
) -> KeyPath<Root, Target, impl for<'r> Fn(&'r Root) -> &'r Target + 'static>where
Value: Deref<Target = Target> + 'static,
F: 'static,
pub fn for_rc<Target>(
self,
) -> KeyPath<Root, Target, impl for<'r> Fn(&'r Root) -> &'r Target + 'static>where
Value: Deref<Target = Target> + 'static,
F: 'static,
Source§impl<Root, Value, F> KeyPath<Root, Value, F>
impl<Root, Value, F> KeyPath<Root, Value, F>
Sourcepub fn to_partial(self) -> PartialKeyPath<Root>
pub fn to_partial(self) -> PartialKeyPath<Root>
Convert to PartialKeyPath (hides Value type)
Sourcepub fn to(self) -> PartialKeyPath<Root>
pub fn to(self) -> PartialKeyPath<Root>
Alias for to_partial() - converts to PartialKeyPath
Trait Implementations§
Auto Trait Implementations§
impl<Root, Value, F> Freeze for KeyPath<Root, Value, F>where
F: Freeze,
impl<Root, Value, F> RefUnwindSafe for KeyPath<Root, Value, F>
impl<Root, Value, F> Send for KeyPath<Root, Value, F>
impl<Root, Value, F> Sync for KeyPath<Root, Value, F>
impl<Root, Value, F> Unpin for KeyPath<Root, Value, F>
impl<Root, Value, F> UnwindSafe for KeyPath<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