pub struct Mpsc { /* private fields */ }Expand description
A paired mpsc transport.
Implementations§
Trait Implementations§
Source§impl NonBlockingTransport for Mpsc
impl NonBlockingTransport for Mpsc
Source§fn send_immediately(
future_state: &mut Self::SendFutureState,
shared: &Self::Shared,
) -> Result<(), Option<Self::Error>>
fn send_immediately( future_state: &mut Self::SendFutureState, shared: &Self::Shared, ) -> Result<(), Option<Self::Error>>
Completes a
SendFutureState with the shared part of the transport
backend without blocking.Source§impl Transport for Mpsc
impl Transport for Mpsc
The shared part of the transport backend. It is provided by shared
reference while sending and receiving. For an MPSC, this would contain a
sender.
Source§type SendBuffer = Vec<WireU64>
type SendBuffer = Vec<WireU64>
The buffer type for sending.
Source§type SendFutureState = SendFutureState
type SendFutureState = SendFutureState
The future state for send operations.
Source§type Exclusive = Exclusive
type Exclusive = Exclusive
The exclusive part of the transport backend. It is provided by mutable
reference only while receiving. For an MPSC, this would contain a
receiver.
Source§type RecvFutureState = RecvFutureState
type RecvFutureState = RecvFutureState
The future state for receive operations.
Source§type RecvBuffer = RecvBuffer
type RecvBuffer = RecvBuffer
The buffer type for receivers.
Source§fn split(self) -> (Self::Shared, Self::Exclusive)
fn split(self) -> (Self::Shared, Self::Exclusive)
Splits the transport backend into shared and exclusive pieces.
Source§fn acquire(_: &Self::Shared) -> Self::SendBuffer
fn acquire(_: &Self::Shared) -> Self::SendBuffer
Acquires an empty send buffer for the transport backend.
Source§fn begin_send(
_: &Self::Shared,
buffer: Self::SendBuffer,
) -> Self::SendFutureState
fn begin_send( _: &Self::Shared, buffer: Self::SendBuffer, ) -> Self::SendFutureState
Begins sending a
SendBuffer over this transport backend. Read moreSource§fn poll_send(
future_state: Pin<&mut SendFutureState>,
_: &mut Context<'_>,
shared: &Self::Shared,
) -> Poll<Result<(), Option<Error>>>
fn poll_send( future_state: Pin<&mut SendFutureState>, _: &mut Context<'_>, shared: &Self::Shared, ) -> Poll<Result<(), Option<Error>>>
Polls a
SendFutureState for completion with the shared part of the
transport backend. Read moreSource§fn begin_recv(
_: &Self::Shared,
_: &mut Self::Exclusive,
) -> Self::RecvFutureState
fn begin_recv( _: &Self::Shared, _: &mut Self::Exclusive, ) -> Self::RecvFutureState
Begins receiving a
RecvBuffer over this transport backend. Read moreAuto Trait Implementations§
impl Freeze for Mpsc
impl !RefUnwindSafe for Mpsc
impl Send for Mpsc
impl !Sync for Mpsc
impl Unpin for Mpsc
impl !UnwindSafe for Mpsc
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