Struct client2::TypedEnvelope
source · pub struct TypedEnvelope<T> {
pub sender_id: ConnectionId,
pub original_sender_id: Option<PeerId>,
pub message_id: u32,
pub payload: T,
}
Fields§
§sender_id: ConnectionId
§original_sender_id: Option<PeerId>
§message_id: u32
§payload: T
Implementations§
source§impl<T> TypedEnvelope<T>
impl<T> TypedEnvelope<T>
pub fn original_sender_id(&self) -> Result<PeerId, Error>
source§impl<T> TypedEnvelope<T>where
T: RequestMessage,
impl<T> TypedEnvelope<T>where T: RequestMessage,
Trait Implementations§
source§impl<T> AnyTypedEnvelope for TypedEnvelope<T>where
T: EnvelopedMessage,
impl<T> AnyTypedEnvelope for TypedEnvelope<T>where T: EnvelopedMessage,
fn payload_type_id(&self) -> TypeId
fn payload_type_name(&self) -> &'static str
fn as_any(&self) -> &(dyn Any + 'static)
fn into_any( self: Box<TypedEnvelope<T>, Global> ) -> Box<dyn Any + Sync + Send, Global>
fn is_background(&self) -> bool
fn original_sender_id(&self) -> Option<PeerId>
fn sender_id(&self) -> ConnectionId
fn message_id(&self) -> u32
source§impl<T> Clone for TypedEnvelope<T>where
T: Clone,
impl<T> Clone for TypedEnvelope<T>where T: Clone,
source§fn clone(&self) -> TypedEnvelope<T>
fn clone(&self) -> TypedEnvelope<T>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl<T> RefUnwindSafe for TypedEnvelope<T>where T: RefUnwindSafe,
impl<T> Send for TypedEnvelope<T>where T: Send,
impl<T> Sync for TypedEnvelope<T>where T: Sync,
impl<T> Unpin for TypedEnvelope<T>where T: Unpin,
impl<T> UnwindSafe for TypedEnvelope<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