pub enum AKP {
AnyKeyPath(AnyKeyPath),
AnyWritableKeyPath(AnyWritableKeyPath),
}Expand description
Enum for fully type-erased keypath types (AnyKeyPath, AnyWritableKeyPath).
Provides syntactic sugar for functions accepting any fully type-erased keypath type.
§Example
ⓘ
fn process_any_keypath(anykp: AKP) {
match anykp {
AKP::AnyKeyPath(k) => { /* handle AnyKeyPath */ },
AKP::AnyWritableKeyPath(k) => { /* handle AnyWritableKeyPath */ },
}
}Variants§
AnyKeyPath(AnyKeyPath)
Fully type-erased keypath (unknown Root and Value).
AnyWritableKeyPath(AnyWritableKeyPath)
Fully type-erased writable keypath.
Trait Implementations§
Source§impl From<AnyKeyPath> for AKP
impl From<AnyKeyPath> for AKP
Source§fn from(kp: RustAnyKeyPath) -> Self
fn from(kp: RustAnyKeyPath) -> Self
Converts to this type from the input type.
Source§impl From<AnyWritableKeyPath> for AKP
impl From<AnyWritableKeyPath> for AKP
Source§fn from(kp: RustAnyWritableKeyPath) -> Self
fn from(kp: RustAnyWritableKeyPath) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for AKP
impl !RefUnwindSafe for AKP
impl !Send for AKP
impl !Sync for AKP
impl Unpin for AKP
impl !UnwindSafe for AKP
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