pub struct PacketProducer<A, T> { /* private fields */ }
Expand description
A producer for packets.
Implementations§
Source§impl<A, T> PacketProducer<A, T>
impl<A, T> PacketProducer<A, T>
Sourcepub async fn send(
&self,
packet: Packet<A, T>,
) -> Result<(), SendError<Packet<A, T>>>
pub async fn send( &self, packet: Packet<A, T>, ) -> Result<(), SendError<Packet<A, T>>>
Sends a packet into the producer.
If the producer is full, this method waits until there is space for a message.
If the producer is closed, this method returns an error.
Trait Implementations§
Source§impl<A, T> Clone for PacketProducer<A, T>
impl<A, T> Clone for PacketProducer<A, T>
Source§fn clone(&self) -> PacketProducer<A, T>
fn clone(&self) -> PacketProducer<A, T>
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl<A, T> Freeze for PacketProducer<A, T>
impl<A, T> RefUnwindSafe for PacketProducer<A, T>
impl<A, T> Send for PacketProducer<A, T>
impl<A, T> Sync for PacketProducer<A, T>
impl<A, T> Unpin for PacketProducer<A, T>
impl<A, T> UnwindSafe for PacketProducer<A, 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§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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more