Struct comet_eventbus::Event
source · pub struct Event<T> { /* private fields */ }
Expand description
An Event
for passing
Implementations§
source§impl<T: Serialize> Event<T>
impl<T: Serialize> Event<T>
sourcepub fn serialized(&self) -> Result<Event<SerializedMessage>, BridgeError>
pub fn serialized(&self) -> Result<Event<SerializedMessage>, BridgeError>
serialize a message
source§impl Event<SerializedMessage>
impl Event<SerializedMessage>
sourcepub fn downcast<T: Sized + DeserializeOwned + 'static>(
&self
) -> Result<Event<T>, BridgeError>
pub fn downcast<T: Sized + DeserializeOwned + 'static>( &self ) -> Result<Event<T>, BridgeError>
downcast a Serialized Event to a concreate type.
Trait Implementations§
Auto Trait Implementations§
impl<T> RefUnwindSafe for Event<T>where T: RefUnwindSafe,
impl<T> Send for Event<T>where T: Send,
impl<T> Sync for Event<T>where T: Sync,
impl<T> Unpin for Event<T>where T: Unpin,
impl<T> UnwindSafe for Event<T>where T: UnwindSafe,
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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request