Struct mesh_channel::MpscSender
source · pub struct MpscSender<T>(/* private fields */);
Expand description
Sender type for mpsc_channel()
.
Implementations§
source§impl<T: MeshField> MpscSender<T>
impl<T: MeshField> MpscSender<T>
sourcepub fn upcast<U: MeshField>(self) -> MpscSender<U>where
Self: Upcast<MpscSender<U>>,
pub fn upcast<U: MeshField>(self) -> MpscSender<U>where
Self: Upcast<MpscSender<U>>,
Upcasts this sender to one that can send values whose encoding is a
subset of T
’s.
sourcepub fn force_downcast<U: MeshField>(self) -> MpscSender<U>where
MpscSender<U>: Upcast<Self>,
pub fn force_downcast<U: MeshField>(self) -> MpscSender<U>where
MpscSender<U>: Upcast<Self>,
Downcasts this sender to one that can send values whose encoding is a
superset of T
’s.
Although this is memory safe, it can cause the receiver to see message decoding errors.
Trait Implementations§
source§impl<T> Clone for MpscSender<T>
impl<T> Clone for MpscSender<T>
source§impl<T> Debug for MpscSender<T>
impl<T> Debug for MpscSender<T>
source§impl<T> DefaultEncoding for MpscSender<T>where
T: MeshField,
impl<T> DefaultEncoding for MpscSender<T>where
T: MeshField,
source§type Encoding = TableEncoder
type Encoding = TableEncoder
The encoding to use for the serialization. Read more
source§impl<T: 'static + Send> RpcSend for MpscSender<T>
impl<T: 'static + Send> RpcSend for MpscSender<T>
source§impl<'encoding, T> StructDecodeMetadata<'encoding, Resource> for MpscSender<T>where
T: MeshField,
impl<'encoding, T> StructDecodeMetadata<'encoding, Resource> for MpscSender<T>where
T: MeshField,
source§const DECODERS: &'static [ErasedDecoderEntry] = _
const DECODERS: &'static [ErasedDecoderEntry] = _
The list of decoder vtables.
source§impl<T> StructEncodeMetadata<Resource> for MpscSender<T>where
T: MeshField,
impl<T> StructEncodeMetadata<Resource> for MpscSender<T>where
T: MeshField,
source§const ENCODERS: &'static [ErasedEncoderEntry] = _
const ENCODERS: &'static [ErasedEncoderEntry] = _
The list of encoder vtables.
source§impl<T> StructMetadata for MpscSender<T>where
T: MeshField,
impl<T> StructMetadata for MpscSender<T>where
T: MeshField,
impl<T: MeshField, U> Downcast<MpscSender<U>> for MpscSender<T>
Auto Trait Implementations§
impl<T> Freeze for MpscSender<T>
impl<T> !RefUnwindSafe for MpscSender<T>
impl<T> Send for MpscSender<T>
impl<T> Sync for MpscSender<T>
impl<T> Unpin for MpscSender<T>
impl<T> !UnwindSafe for MpscSender<T>
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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> SerializeMessage for Twhere
T: MeshPayload,
impl<T> SerializeMessage for Twhere
T: MeshPayload,
source§fn compute_message_size(&mut self, sizer: MessageSizer<'_>)
fn compute_message_size(&mut self, sizer: MessageSizer<'_>)
Computes the message size, as in
MessageEncode::compute_message_size
.source§fn write_message(self, writer: MessageWriter<'_, '_, Resource>)
fn write_message(self, writer: MessageWriter<'_, '_, Resource>)
Writes the message, as in
MessageEncode::write_message
.source§fn extract(self) -> <T as SerializeMessage>::Concrete
fn extract(self) -> <T as SerializeMessage>::Concrete
Extract the concrete message.