pub enum Outcome<T, P> {
NoPanic(T),
Panicked(P),
}
Expand description
Enumerates the expected outcomes from joining a panic-checked thread.
Outcome
values are returned in the Ok
result variant
of the join()
method of a CheckedJoinHandle
.
Variants§
NoPanic(T)
Indicates that the thread closure has returned normally, and provides the return value.
Panicked(P)
Indicates that the thread has panicked with the expected type, and provides the panic value.
Implementations§
Trait Implementations§
impl<T: Copy, P: Copy> Copy for Outcome<T, P>
impl<T: Eq, P: Eq> Eq for Outcome<T, P>
impl<T, P> StructuralPartialEq for Outcome<T, P>
Auto Trait Implementations§
impl<T, P> Freeze for Outcome<T, P>
impl<T, P> RefUnwindSafe for Outcome<T, P>where
T: RefUnwindSafe,
P: RefUnwindSafe,
impl<T, P> Send for Outcome<T, P>
impl<T, P> Sync for Outcome<T, P>
impl<T, P> Unpin for Outcome<T, P>
impl<T, P> UnwindSafe for Outcome<T, P>where
T: UnwindSafe,
P: 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