pub struct ReuniteError<R, S> {
pub rh: R,
pub sh: S,
}Expand description
Error type of .reunite() on splittable stream types, indicating that the two halves belong to
different streams.
Fields§
§rh: ROwnership of the receive half.
sh: SOwnership of the send half.
Implementations§
Source§impl<R, S> ReuniteError<R, S>
impl<R, S> ReuniteError<R, S>
Sourcepub fn map_halves<NR: From<R>, NS: From<S>>(
self,
fr: impl FnOnce(R) -> NR,
fs: impl FnOnce(S) -> NS,
) -> ReuniteError<NR, NS>
pub fn map_halves<NR: From<R>, NS: From<S>>( self, fr: impl FnOnce(R) -> NR, fs: impl FnOnce(S) -> NS, ) -> ReuniteError<NR, NS>
Maps the halves of the stream using the given closures.
Sourcepub fn convert_halves<NR: From<R>, NS: From<S>>(self) -> ReuniteError<NR, NS>
pub fn convert_halves<NR: From<R>, NS: From<S>>(self) -> ReuniteError<NR, NS>
Maps the halves of the stream using the From trait.
This is useful when implementing wrappers around stream types.
Trait Implementations§
Source§impl<R, S> Display for ReuniteError<R, S>
impl<R, S> Display for ReuniteError<R, S>
Source§impl<R: Debug, S: Debug> Error for ReuniteError<R, S>
impl<R: Debug, S: Debug> Error for ReuniteError<R, S>
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl<R, S> Freeze for ReuniteError<R, S>
impl<R, S> RefUnwindSafe for ReuniteError<R, S>where
R: RefUnwindSafe,
S: RefUnwindSafe,
impl<R, S> Send for ReuniteError<R, S>
impl<R, S> Sync for ReuniteError<R, S>
impl<R, S> Unpin for ReuniteError<R, S>
impl<R, S> UnwindSafe for ReuniteError<R, S>where
R: UnwindSafe,
S: 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