Struct mesh::OneshotSender
source · pub struct OneshotSender<T>(/* private fields */);
Expand description
The sending half of a channel returned by oneshot
.
Implementations§
source§impl<T> OneshotSender<T>where
T: MeshField,
impl<T> OneshotSender<T>where
T: MeshField,
sourcepub fn upcast<U>(self) -> OneshotSender<U>
pub fn upcast<U>(self) -> OneshotSender<U>
Upcasts this sender to one that can send values whose encoding is a
subset of T
’s.
sourcepub fn force_downcast<U>(self) -> OneshotSender<U>
pub fn force_downcast<U>(self) -> OneshotSender<U>
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> Debug for OneshotSender<T>
impl<T> Debug for OneshotSender<T>
source§impl<T> DefaultEncoding for OneshotSender<T>where
T: MeshField,
impl<T> DefaultEncoding for OneshotSender<T>where
T: MeshField,
source§type Encoding = TableEncoder
type Encoding = TableEncoder
The encoding to use for the serialization. Read more
source§impl<T> From<OneshotSender<T>> for Portwhere
T: MeshField,
impl<T> From<OneshotSender<T>> for Portwhere
T: MeshField,
source§fn from(v: OneshotSender<T>) -> Port
fn from(v: OneshotSender<T>) -> Port
Converts to this type from the input type.
source§impl<T> From<Port> for OneshotSender<T>where
T: MeshField,
impl<T> From<Port> for OneshotSender<T>where
T: MeshField,
source§fn from(port: Port) -> OneshotSender<T>
fn from(port: Port) -> OneshotSender<T>
Converts to this type from the input type.
source§impl<'encoding, T> StructDecodeMetadata<'encoding, Resource> for OneshotSender<T>where
T: MeshField,
impl<'encoding, T> StructDecodeMetadata<'encoding, Resource> for OneshotSender<T>where
T: MeshField,
source§const DECODERS: &'static [ErasedDecoderEntry] = _
const DECODERS: &'static [ErasedDecoderEntry] = _
The list of decoder vtables.
source§impl<T> StructEncodeMetadata<Resource> for OneshotSender<T>where
T: MeshField,
impl<T> StructEncodeMetadata<Resource> for OneshotSender<T>where
T: MeshField,
source§const ENCODERS: &'static [ErasedEncoderEntry] = _
const ENCODERS: &'static [ErasedEncoderEntry] = _
The list of encoder vtables.
source§impl<T> StructMetadata for OneshotSender<T>where
T: MeshField,
impl<T> StructMetadata for OneshotSender<T>where
T: MeshField,
impl<T, U> Downcast<OneshotSender<U>> for OneshotSender<T>
Auto Trait Implementations§
impl<T> Freeze for OneshotSender<T>
impl<T> !RefUnwindSafe for OneshotSender<T>
impl<T> Send for OneshotSender<T>
impl<T> Sync for OneshotSender<T>
impl<T> Unpin for OneshotSender<T>
impl<T> !UnwindSafe for OneshotSender<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> 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.