[−][src]Enum dialectic::SessionIncomplete
The error returned when a closure which is expected to complete a channel's session fails to finish the session of the channel it is given.
This error can arise either if the channel is dropped before its session is completed, or if
it is stored somewhere and is dropped after the closure's future is finished. The best way to
ensure this error does not occur is to call close
on the channel,
which statically ensures it is dropped exactly when the session is complete.
Variants
Both the sending half Tx
and the receiving half Rx
did not complete the session
correctly.
Fields of BothHalves
tx: IncompleteHalf<Tx>
The incomplete sending half: Unfinished
if dropped
before the end of the session, Unclosed
if not dropped
after the end of the session.
rx: IncompleteHalf<Rx>
The incomplete receiving half: Unfinished
if dropped
before the end of the session, Unclosed
if not dropped
after the end of the session.
Only the sending half Tx
did not complete the session correctly, but the receiving half
Rx
did complete it correctly.
Fields of TxHalf
tx: IncompleteHalf<Tx>
The incomplete sending half: Unfinished
if dropped
before the end of the session, Unclosed
if not dropped
after the end of the session.
rx: Rx
The receiving half, whose session was completed.
Only the receiving half Rx
did not complete the session correctly, but the sending half
Tx
did complete it correctly.
Fields of RxHalf
tx: Tx
The sending half, whose session was completed.
rx: IncompleteHalf<Rx>
The incomplete receiving half: Unfinished
if dropped
before the end of the session, Unclosed
if not dropped
after the end of the session.
Implementations
impl<Tx, Rx> SessionIncomplete<Tx, Rx>
[src]
pub fn into_halves(
self
) -> (Result<Tx, IncompleteHalf<Tx>>, Result<Rx, IncompleteHalf<Rx>>)
[src]
self
) -> (Result<Tx, IncompleteHalf<Tx>>, Result<Rx, IncompleteHalf<Rx>>)
Extract the send and receive halves Tx
and Rx
, if they are present, from this
SessionIncomplete
error.
Trait Implementations
impl<Tx, Rx> Debug for SessionIncomplete<Tx, Rx>
[src]
impl<Tx, Rx> Display for SessionIncomplete<Tx, Rx>
[src]
impl<Tx, Rx> Error for SessionIncomplete<Tx, Rx>
[src]
Auto Trait Implementations
impl<Tx, Rx> RefUnwindSafe for SessionIncomplete<Tx, Rx> where
Rx: RefUnwindSafe,
Tx: RefUnwindSafe,
[src]
Rx: RefUnwindSafe,
Tx: RefUnwindSafe,
impl<Tx, Rx> Send for SessionIncomplete<Tx, Rx> where
Rx: Send,
Tx: Send,
[src]
Rx: Send,
Tx: Send,
impl<Tx, Rx> Sync for SessionIncomplete<Tx, Rx> where
Rx: Sync,
Tx: Sync,
[src]
Rx: Sync,
Tx: Sync,
impl<Tx, Rx> Unpin for SessionIncomplete<Tx, Rx> where
Rx: Unpin,
Tx: Unpin,
[src]
Rx: Unpin,
Tx: Unpin,
impl<Tx, Rx> UnwindSafe for SessionIncomplete<Tx, Rx> where
Rx: UnwindSafe,
Tx: UnwindSafe,
[src]
Rx: UnwindSafe,
Tx: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<'a, T> CallBy<'a, Mut> for T where
T: 'a,
[src]
T: 'a,
impl<'a, T> CallBy<'a, Ref> for T where
T: 'a,
[src]
T: 'a,
impl<'a, T> CallBy<'a, Val> for T
[src]
type Type = T
The type of Self
when called by Convention
.
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,