Enum panic_control::Outcome
[−]
[src]
pub enum Outcome<T, P> { NoPanic(T), Panicked(P), }
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.
Methods
impl<T, P> Outcome<T, P>
[src]
pub fn has_panicked(&self) -> bool
[src]
Tests whether the value contains the variant Panicked
.
Trait Implementations
impl<T: Copy, P: Copy> Copy for Outcome<T, P>
[src]
impl<T: Clone, P: Clone> Clone for Outcome<T, P>
[src]
fn clone(&self) -> Outcome<T, P>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<T: Debug, P: Debug> Debug for Outcome<T, P>
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<T: PartialEq, P: PartialEq> PartialEq for Outcome<T, P>
[src]
fn eq(&self, __arg_0: &Outcome<T, P>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Outcome<T, P>) -> bool
[src]
This method tests for !=
.