pub struct YieldedVal { /* private fields */ }
Expand description
The value yielded by an instance through a Vmctx
and returned to
the host.
Implementations§
Source§impl YieldedVal
impl YieldedVal
Sourcepub fn downcast<A: Any + 'static>(self) -> Result<Box<A>, YieldedVal>
pub fn downcast<A: Any + 'static>(self) -> Result<Box<A>, YieldedVal>
Attempt to downcast the yielded value to a concrete type, returning the original
YieldedVal
if unsuccessful.
Sourcepub fn downcast_ref<A: Any + 'static>(&self) -> Option<&A>
pub fn downcast_ref<A: Any + 'static>(&self) -> Option<&A>
Returns a reference to the yielded value if it is present and of type A
, or None
if it
isn’t.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for YieldedVal
impl !RefUnwindSafe for YieldedVal
impl !Send for YieldedVal
impl !Sync for YieldedVal
impl Unpin for YieldedVal
impl !UnwindSafe for YieldedVal
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