pub struct GenericReceiverSet<T: Serialize + for<'de> Deserialize<'de>>(GenericReceiverSetVariants<T>);Expand description
A GenericReceiverSet. Allows you to wait on multiple GenericReceivers. Automatically selects either Ipc or crossbeam depending on multiprocess mode.
§Examples
Tuple Fields§
§0: GenericReceiverSetVariants<T>Implementations§
Source§impl<T: Serialize + for<'de> Deserialize<'de>> GenericReceiverSet<T>
impl<T: Serialize + for<'de> Deserialize<'de>> GenericReceiverSet<T>
Sourcepub fn new() -> GenericReceiverSet<T>
pub fn new() -> GenericReceiverSet<T>
Create a new ReceiverSet.
Sourcepub fn add(&mut self, receiver: GenericReceiver<T>) -> u64
pub fn add(&mut self, receiver: GenericReceiver<T>) -> u64
Add a receiver to the set.
Sourcepub fn select(&mut self) -> Vec<GenericSelectionResult<T>>
pub fn select(&mut self) -> Vec<GenericSelectionResult<T>>
Block until at least one of the Receivers receives a message and return a vector of the received messages.
Trait Implementations§
Source§impl<T: Serialize + for<'de> Deserialize<'de>> Default for GenericReceiverSet<T>
impl<T: Serialize + for<'de> Deserialize<'de>> Default for GenericReceiverSet<T>
Auto Trait Implementations§
impl<T> Freeze for GenericReceiverSet<T>
impl<T> RefUnwindSafe for GenericReceiverSet<T>
impl<T> Send for GenericReceiverSet<T>where
T: Send,
impl<T> Sync for GenericReceiverSet<T>where
T: Send,
impl<T> Unpin for GenericReceiverSet<T>where
T: Unpin,
impl<T> UnwindSafe for GenericReceiverSet<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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
Source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
Source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
Source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert