pub struct ProcessReceiver<T: Receivable> { /* private fields */ }Expand description
Used to receive messages from processes.
Implementations§
Source§impl<T> ProcessReceiver<T>where
T: Receivable,
impl<T> ProcessReceiver<T>where
T: Receivable,
Sourcepub fn strict_type_checking(self) -> Self
pub fn strict_type_checking(self) -> Self
Enables strict type checking which will panic if the message type doesn’t match.
Sourcepub fn for_message<N: Receivable>(self) -> ProcessReceiver<N>
pub fn for_message<N: Receivable>(self) -> ProcessReceiver<N>
Sets the message type this receiver will handle.
Sourcepub async fn select<F: Fn(&Message<&T>) -> bool + Send>(
self,
filter: F,
) -> Message<T>
pub async fn select<F: Fn(&Message<&T>) -> bool + Send>( self, filter: F, ) -> Message<T>
Selects a single message.
Auto Trait Implementations§
impl<T> Freeze for ProcessReceiver<T>
impl<T> RefUnwindSafe for ProcessReceiver<T>where
T: RefUnwindSafe,
impl<T> Send for ProcessReceiver<T>
impl<T> Sync for ProcessReceiver<T>where
T: Sync,
impl<T> Unpin for ProcessReceiver<T>where
T: Unpin,
impl<T> UnwindSafe for ProcessReceiver<T>where
T: UnwindSafe,
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