pub struct MpscFdReceiver<T> { /* private fields */ }Expand description
Receiver half of an MpscFd pair
Implementations§
Source§impl<T> MpscFdReceiver<T>
impl<T> MpscFdReceiver<T>
Sourcepub fn recv(&mut self) -> Result<T, RecvError>
pub fn recv(&mut self) -> Result<T, RecvError>
Receive a message from the mpsc channel and read a byte from the pipe.
Sourcepub fn try_recv(&mut self) -> Result<T, TryRecvError>
pub fn try_recv(&mut self) -> Result<T, TryRecvError>
Try to receive a message without blocking.
Readability of the fd is a hint that this will likely return a value, however this may return Empty and leave the fd readable in certain cases.
Sourcepub fn recv_timeout(&mut self, timeout: Duration) -> Result<T, RecvTimeoutError>
pub fn recv_timeout(&mut self, timeout: Duration) -> Result<T, RecvTimeoutError>
Receive with timeout. Note that this may block slightly more than timeout
if the pipe was written but the channel was not.
Readability of the fd is a hint that this will likely return a value, however this may return Empty and leave the fd readable in certain cases.
Trait Implementations§
Source§impl<T> AsRawFd for MpscFdReceiver<T>
Available on Unix only.
impl<T> AsRawFd for MpscFdReceiver<T>
Available on Unix only.
Source§impl<'a, T> Into<BorrowedFd<'a>> for &'a MpscFdReceiver<T>
Available on Unix only.
impl<'a, T> Into<BorrowedFd<'a>> for &'a MpscFdReceiver<T>
Available on Unix only.
Source§fn into(self) -> BorrowedFd<'a>
fn into(self) -> BorrowedFd<'a>
Converts this type into the (usually inferred) input type.
Auto Trait Implementations§
impl<T> Freeze for MpscFdReceiver<T>
impl<T> RefUnwindSafe for MpscFdReceiver<T>
impl<T> Send for MpscFdReceiver<T>where
T: Send,
impl<T> !Sync for MpscFdReceiver<T>
impl<T> Unpin for MpscFdReceiver<T>
impl<T> UnsafeUnpin for MpscFdReceiver<T>
impl<T> UnwindSafe for MpscFdReceiver<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