pub struct Empty<AddrBuf = ()>(/* private fields */);
Expand description
Dummy message stream that is at end-of-stream from the outset.
Implementations§
Trait Implementations§
source§impl<AddrBuf: Ord> Ord for Empty<AddrBuf>
impl<AddrBuf: Ord> Ord for Empty<AddrBuf>
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl<AddrBuf: PartialEq> PartialEq for Empty<AddrBuf>
impl<AddrBuf: PartialEq> PartialEq for Empty<AddrBuf>
source§impl<AddrBuf: PartialOrd> PartialOrd for Empty<AddrBuf>
impl<AddrBuf: PartialOrd> PartialOrd for Empty<AddrBuf>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl<AddrBuf> RecvMsg for Empty<AddrBuf>
impl<AddrBuf> RecvMsg for Empty<AddrBuf>
§type Error = Infallible
type Error = Infallible
The I/O error type. Read more
source§fn poll_recv_msg(
self: Pin<&mut Self>,
_: &mut Context<'_>,
_: &mut MsgBuf<'_>,
_: Option<&mut AddrBuf>
) -> Poll<Result<RecvResult, Self::Error>>
fn poll_recv_msg( self: Pin<&mut Self>, _: &mut Context<'_>, _: &mut MsgBuf<'_>, _: Option<&mut AddrBuf> ) -> Poll<Result<RecvResult, Self::Error>>
Polls a future that receives one message using the given buffer, (re)allocating the buffer
if necessary. Read more
source§impl<AddrBuf> RecvMsg for Empty<AddrBuf>
impl<AddrBuf> RecvMsg for Empty<AddrBuf>
§type Error = Infallible
type Error = Infallible
The I/O error type. Read more
source§fn recv_msg(
&mut self,
_: &mut MsgBuf<'_>,
_: Option<&mut AddrBuf>
) -> Result<RecvResult, Self::Error>
fn recv_msg( &mut self, _: &mut MsgBuf<'_>, _: Option<&mut AddrBuf> ) -> Result<RecvResult, Self::Error>
Receives one message using the given buffer, (re)allocating the buffer if necessary. Read more
source§impl<AddrBuf> TruncatingRecvMsg for Empty<AddrBuf>
impl<AddrBuf> TruncatingRecvMsg for Empty<AddrBuf>
source§impl<AddrBuf> TruncatingRecvMsg for Empty<AddrBuf>
impl<AddrBuf> TruncatingRecvMsg for Empty<AddrBuf>
§type Error = Infallible
type Error = Infallible
The I/O error type. Read more
source§impl<AddrBuf> TruncatingRecvMsgWithFullSize for Empty<AddrBuf>
impl<AddrBuf> TruncatingRecvMsgWithFullSize for Empty<AddrBuf>
source§fn recv_trunc_with_full_size(
&mut self,
_: bool,
_: &mut MsgBuf<'_>,
_: Option<&mut AddrBuf>
) -> Result<TryRecvResult, Self::Error>
fn recv_trunc_with_full_size( &mut self, _: bool, _: &mut MsgBuf<'_>, _: Option<&mut AddrBuf> ) -> Result<TryRecvResult, Self::Error>
Like
.recv_trunc()
, but returns the true length of the
message (size before truncation).source§impl<AddrBuf> TruncatingRecvMsgWithFullSize for Empty<AddrBuf>
impl<AddrBuf> TruncatingRecvMsgWithFullSize for Empty<AddrBuf>
source§fn poll_recv_trunc_with_full_size(
self: Pin<&mut Self>,
_: &mut Context<'_>,
_: bool,
_: &mut MsgBuf<'_>,
_: Option<&mut AddrBuf>
) -> Poll<Result<TryRecvResult, Self::Error>>
fn poll_recv_trunc_with_full_size( self: Pin<&mut Self>, _: &mut Context<'_>, _: bool, _: &mut MsgBuf<'_>, _: Option<&mut AddrBuf> ) -> Poll<Result<TryRecvResult, Self::Error>>
Like
.poll_recv_trunc()
, but returns the true
length of the message (size before truncation).impl<AddrBuf: Copy> Copy for Empty<AddrBuf>
impl<AddrBuf: Eq> Eq for Empty<AddrBuf>
impl<AddrBuf> StructuralEq for Empty<AddrBuf>
impl<AddrBuf> StructuralPartialEq for Empty<AddrBuf>
Auto Trait Implementations§
impl<AddrBuf> RefUnwindSafe for Empty<AddrBuf>
impl<AddrBuf> Send for Empty<AddrBuf>
impl<AddrBuf> Sync for Empty<AddrBuf>
impl<AddrBuf> Unpin for Empty<AddrBuf>
impl<AddrBuf> UnwindSafe for Empty<AddrBuf>
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> RecvMsgExt for T
impl<T> RecvMsgExt for T
source§impl<T> TruncatingRecvMsgExt for Twhere
T: TruncatingRecvMsg + ?Sized,
impl<T> TruncatingRecvMsgExt for Twhere
T: TruncatingRecvMsg + ?Sized,
source§fn recv_trunc<'io, 'buf, 'slice, 'abuf>(
&'io mut self,
peek: bool,
buf: &'buf mut MsgBuf<'slice>,
abuf: Option<&'abuf mut Self::AddrBuf>
) -> RecvTrunc<'io, 'buf, 'slice, 'abuf, Self> ⓘwhere
Self: Unpin,
fn recv_trunc<'io, 'buf, 'slice, 'abuf>(
&'io mut self,
peek: bool,
buf: &'buf mut MsgBuf<'slice>,
abuf: Option<&'abuf mut Self::AddrBuf>
) -> RecvTrunc<'io, 'buf, 'slice, 'abuf, Self> ⓘwhere
Self: Unpin,
Receives one message into the given buffer, returning: Read more
source§fn discard_msg(&mut self) -> DiscardMsg<'_, Self> ⓘwhere
Self: Unpin,
fn discard_msg(&mut self) -> DiscardMsg<'_, Self> ⓘwhere
Self: Unpin,
Discards the message at the front of the queue. If at end-of-communication, succeeds with no
effect.
source§impl<T> TruncatingRecvMsgWithFullSizeExt for Twhere
T: TruncatingRecvMsgWithFullSize + ?Sized,
impl<T> TruncatingRecvMsgWithFullSizeExt for Twhere
T: TruncatingRecvMsgWithFullSize + ?Sized,
source§fn try_recv_msg(
&mut self,
buf: &mut MsgBuf<'_>,
abuf: Option<&mut Self::AddrBuf>
) -> Result<TryRecvResult, Self::Error>
fn try_recv_msg( &mut self, buf: &mut MsgBuf<'_>, abuf: Option<&mut Self::AddrBuf> ) -> Result<TryRecvResult, Self::Error>
Attempts to receive one message using the given buffer. If the message at the front of the
queue does not fit, no (re)allocation is done and the message is neither written to the
buffer nor taken off the underlying queue. Read more
source§impl<T> TruncatingRecvMsgWithFullSizeExt for Twhere
T: TruncatingRecvMsgWithFullSize + ?Sized,
impl<T> TruncatingRecvMsgWithFullSizeExt for Twhere
T: TruncatingRecvMsgWithFullSize + ?Sized,
source§fn recv_trunc_with_full_size<'io, 'buf, 'slice, 'abuf>(
&'io mut self,
peek: bool,
buf: &'buf mut MsgBuf<'slice>,
abuf: Option<&'abuf mut Self::AddrBuf>
) -> RecvTruncWithFullSize<'io, 'buf, 'slice, 'abuf, Self> ⓘwhere
Self: Unpin,
fn recv_trunc_with_full_size<'io, 'buf, 'slice, 'abuf>(
&'io mut self,
peek: bool,
buf: &'buf mut MsgBuf<'slice>,
abuf: Option<&'abuf mut Self::AddrBuf>
) -> RecvTruncWithFullSize<'io, 'buf, 'slice, 'abuf, Self> ⓘwhere
Self: Unpin,
Like
.recv_trunc()
, but returns the true length
of the message (size before truncation).source§fn try_recv_msg<'io, 'buf, 'slice, 'abuf>(
&'io mut self,
buf: &'buf mut MsgBuf<'slice>,
abuf: Option<&'abuf mut Self::AddrBuf>
) -> TryRecv<'io, 'buf, 'slice, 'abuf, Self> ⓘ
fn try_recv_msg<'io, 'buf, 'slice, 'abuf>( &'io mut self, buf: &'buf mut MsgBuf<'slice>, abuf: Option<&'abuf mut Self::AddrBuf> ) -> TryRecv<'io, 'buf, 'slice, 'abuf, Self> ⓘ
Attempts to receive one message using the given buffer. If the message at the front of the
queue does not fit, no (re)allocation is done and the message is neither written to the
buffer nor taken off the underlying queue. Read more