Struct MessagePipe
pub(in ::bridge::server) struct MessagePipe<T> { pub(in ::bridge::server) tx: SyncSender<T>, pub(in ::bridge::server) rx: Receiver<T> }
A message pipe used for communicating between server and client threads.
Fields
tx: SyncSender<T>rx: Receiver<T>
Implementations
impl<T> MessagePipe<T>
fn new() -> (Self, Self)Creates a new pair of endpoints for the message pipe.
fn send(&mut self, value: T)Send a message to the other endpoint of this pipe.
fn recv(&mut self) -> Option<T>Receive a message from the other endpoint of this pipe.
Returns
Noneif the other end of the pipe has been destroyed, and no message was received.
Auto Trait Implementations
impl<T> !Sync for MessagePipe<T>
impl<T> Freeze for MessagePipe<T>
where
SyncSender<T>: Freeze,
Receiver<T>: Freeze,
impl<T> RefUnwindSafe for MessagePipe<T>
where
SyncSender<T>: RefUnwindSafe,
Receiver<T>: RefUnwindSafe,
impl<T> Send for MessagePipe<T>
where
SyncSender<T>: Send,
Receiver<T>: Send,
impl<T> Unpin for MessagePipe<T>
where
SyncSender<T>: Unpin,
Receiver<T>: Unpin,
impl<T> UnsafeUnpin for MessagePipe<T>
where
SyncSender<T>: UnsafeUnpin,
Receiver<T>: UnsafeUnpin,
impl<T> UnwindSafe for MessagePipe<T>
where
SyncSender<T>: UnwindSafe,
Receiver<T>: UnwindSafe,
Blanket Implementations
impl<T> Any for MessagePipe<T>
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for MessagePipe<T>
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for MessagePipe<T>
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> From<T> for MessagePipe<T>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> SizeHint for MessagePipe<T>
where
T: ?Sized,
fn lower_bound(&self) -> usizefn upper_bound(&self) -> Option<usize>
impl<T> SizedTypeProperties for MessagePipe<T>
impl<T, U> Into<U> for MessagePipe<T>
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for MessagePipe<T>
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for MessagePipe<T>
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>