pub struct BoxedMessage(/* private fields */);
Expand description
A simple wrapper around a Box<dyn Any + Send + 'static>
, which only allows
the Sends<M>
to be stored inside.
Implementations§
Source§impl BoxedMessage
impl BoxedMessage
Sourcepub fn downcast<M>(self) -> Result<SendPart<M>, Self>
pub fn downcast<M>(self) -> Result<SendPart<M>, Self>
Downcast the BoxedMessage
to the Sends<M>
.
Sourcepub fn downcast_into_msg<M>(self, returns: ReturnPart<M>) -> Result<M, Self>
pub fn downcast_into_msg<M>(self, returns: ReturnPart<M>) -> Result<M, Self>
Downcast the BoxedMessage
to the Sends<M>
, and then get M
.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BoxedMessage
impl !RefUnwindSafe for BoxedMessage
impl Send for BoxedMessage
impl !Sync for BoxedMessage
impl Unpin for BoxedMessage
impl !UnwindSafe for BoxedMessage
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