pub struct UnsizeableMut<'a> { /* private fields */ }
Expand description
Mutable reference holder, returned by TypeInfoDynamic::field_mut
method
Can be downcasted to underlying type if underlying type is “nameable”
Implementations§
Source§impl<'a> UnsizeableMut<'a>
impl<'a> UnsizeableMut<'a>
Sourcepub fn downcast_mut<T>(&self) -> Option<&'a mut T>where
T: 'static,
pub fn downcast_mut<T>(&self) -> Option<&'a mut T>where
T: 'static,
Attempts to downcast field to mutable reference of particular type
You need to be able to name this type in compile-time
If T
doesn’t match actual type, Option::None
will be returned
Auto Trait Implementations§
impl<'a> Freeze for UnsizeableMut<'a>
impl<'a> RefUnwindSafe for UnsizeableMut<'a>
impl<'a> !Send for UnsizeableMut<'a>
impl<'a> !Sync for UnsizeableMut<'a>
impl<'a> Unpin for UnsizeableMut<'a>
impl<'a> UnwindSafe for UnsizeableMut<'a>
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