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