enum GenericSenderVariants<T: Serialize> {
Ipc(IpcSender<T>),
Crossbeam(Sender<Result<T, Error>>),
}
Expand description
The actual GenericSender variant.
This enum is private, so that outside code can’t construct a GenericSender itself. This ensures that users can’t construct a crossbeam variant in multiprocess mode.
Variants§
Ipc(IpcSender<T>)
Crossbeam(Sender<Result<T, Error>>)
A crossbeam-channel. To keep the API in sync with the Ipc variant when using a Router, which propagates the IPC error, the inner type is a Result. In the IPC case, the Router deserializes the message, which can fail, and sends the result to a crossbeam receiver. The crossbeam channel does not involve serializing, so we can’t have this error, but replicating the API allows us to have one channel type as the receiver after routing the receiver .
Auto Trait Implementations§
impl<T> Freeze for GenericSenderVariants<T>
impl<T> !RefUnwindSafe for GenericSenderVariants<T>
impl<T> Send for GenericSenderVariants<T>where
T: Send,
impl<T> !Sync for GenericSenderVariants<T>
impl<T> Unpin for GenericSenderVariants<T>where
T: Unpin,
impl<T> UnwindSafe for GenericSenderVariants<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
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