pub struct AnyWritableKeyPath { /* private fields */ }Expand description
AnyWritableKeyPath - Hides both Root and Value types (writable)
Implementations§
Source§impl AnyWritableKeyPath
impl AnyWritableKeyPath
pub fn new<Root, Value>( keypath: WritableOptionalKeyPath<Root, Value, impl for<'r> Fn(&'r mut Root) -> Option<&'r mut Value> + 'static>, ) -> AnyWritableKeyPath
pub fn get_mut<'r>( &self, root: &'r mut (dyn Any + 'static), ) -> Option<&'r mut (dyn Any + 'static)>
Sourcepub fn root_type_id(&self) -> TypeId
pub fn root_type_id(&self) -> TypeId
Get the TypeId of the Root type
Sourcepub fn value_type_id(&self) -> TypeId
pub fn value_type_id(&self) -> TypeId
Get the TypeId of the Value type
Sourcepub fn get_mut_as<'a, Root, Value>(
&self,
root: &'a mut Root,
) -> Option<Option<&'a mut Value>>
pub fn get_mut_as<'a, Root, Value>( &self, root: &'a mut Root, ) -> Option<Option<&'a mut Value>>
Try to get the value with type checking
Trait Implementations§
Source§impl Clone for AnyWritableKeyPath
impl Clone for AnyWritableKeyPath
Source§fn clone(&self) -> AnyWritableKeyPath
fn clone(&self) -> AnyWritableKeyPath
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 moreSource§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 AnyWritableKeyPath
impl !RefUnwindSafe for AnyWritableKeyPath
impl !Send for AnyWritableKeyPath
impl !Sync for AnyWritableKeyPath
impl Unpin for AnyWritableKeyPath
impl !UnwindSafe for AnyWritableKeyPath
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