pub struct EnumKeyPaths;Implementations§
Source§impl EnumKeyPaths
impl EnumKeyPaths
pub fn for_variant<Enum, Variant, ExtractFn>( extractor: ExtractFn, ) -> OptionalKeyPath<Enum, Variant, impl for<'r> Fn(&'r Enum) -> Option<&'r Variant>>
pub fn for_match<Enum, Output, MatchFn>( matcher: MatchFn, ) -> KeyPath<Enum, Output, impl for<'r> Fn(&'r Enum) -> &'r Output>
pub fn for_ok<T, E>() -> OptionalKeyPath<Result<T, E>, T, impl for<'r> Fn(&'r Result<T, E>) -> Option<&'r T>>
pub fn for_err<T, E>() -> OptionalKeyPath<Result<T, E>, E, impl for<'r> Fn(&'r Result<T, E>) -> Option<&'r E>>
pub fn for_some<T>() -> OptionalKeyPath<Option<T>, T, impl for<'r> Fn(&'r Option<T>) -> Option<&'r T>>
pub fn for_option<T>() -> OptionalKeyPath<Option<T>, T, impl for<'r> Fn(&'r Option<T>) -> Option<&'r T>>
pub fn for_box<T>() -> KeyPath<Box<T>, T, impl for<'r> Fn(&'r Box<T>) -> &'r T>
pub fn for_arc<T>() -> KeyPath<Arc<T>, T, impl for<'r> Fn(&'r Arc<T>) -> &'r T>
pub fn for_rc<T>() -> KeyPath<Rc<T>, T, impl for<'r> Fn(&'r Rc<T>) -> &'r T>
pub fn for_box_mut<T>() -> WritableKeyPath<Box<T>, T, impl for<'r> Fn(&'r mut Box<T>) -> &'r mut T>
Trait Implementations§
Source§impl Clone for EnumKeyPaths
impl Clone for EnumKeyPaths
Source§fn clone(&self) -> EnumKeyPaths
fn clone(&self) -> EnumKeyPaths
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 Freeze for EnumKeyPaths
impl RefUnwindSafe for EnumKeyPaths
impl Send for EnumKeyPaths
impl Sync for EnumKeyPaths
impl Unpin for EnumKeyPaths
impl UnwindSafe for EnumKeyPaths
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