pub struct Artifact(pub Box<dyn Any + Send + Sync>);
Expand description
Associated data created alongside a message in Round::make_direct_message
.
Tuple Fields§
§0: Box<dyn Any + Send + Sync>
Implementations§
Source§impl Artifact
impl Artifact
Sourcepub fn new<T: 'static + Send + Sync>(artifact: T) -> Self
pub fn new<T: 'static + Send + Sync>(artifact: T) -> Self
Creates a new artifact.
Would be normally called in Round::make_direct_message
.
Sourcepub fn downcast<T: 'static>(self) -> Result<T, LocalError>
pub fn downcast<T: 'static>(self) -> Result<T, LocalError>
Attempts to downcast back to the concrete type.
Would be normally called in Round::finalize
.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Artifact
impl !RefUnwindSafe for Artifact
impl Send for Artifact
impl Sync for Artifact
impl Unpin for Artifact
impl !UnwindSafe for Artifact
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