Skip to main content

Exit

Enum Exit 

Source
#[repr(u8)]
pub enum Exit<T: _T> { Ok(T), Error(String), InvocationError(String), IO(String), }

Variants§

§

Ok(T)

§

Error(String)

§

InvocationError(String)

§

IO(String)

Trait Implementations§

Source§

impl<T: Debug + _T> Debug for Exit<T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<Cmd> for Exit<()>

Source§

fn from(cmd: Cmd) -> Self

Converts to this type from the input type.
Source§

impl<T: _T> From<Error> for Exit<T>

Source§

fn from(e: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Spawned> for Exit<()>

Source§

fn from(spawn: Spawned) -> Self

Converts to this type from the input type.
Source§

impl From<Vec<Spawned>> for Exit<()>

Source§

fn from(spawns: Vec<Spawned>) -> Self

Converts to this type from the input type.
Source§

impl FromIterator<Exit<()>> for Exit<()>

Source§

fn from_iter<I: IntoIterator<Item = Exit<()>>>(iter: I) -> Self

Creates a value from an iterator. Read more
Source§

impl<T: _T> FromResidual<Exit<!>> for Exit<T>

Source§

fn from_residual(residual: Exit<!>) -> Self

🔬This is a nightly-only experimental API. (try_trait_v2)
Constructs the type from a compatible Residual type. Read more
Source§

impl<Derive_TryConvert_ResultT, Derive_TryConvert_ResultE: From<Exit<!>>> FromResidual<Exit<!>> for Result<Derive_TryConvert_ResultT, Derive_TryConvert_ResultE>

Source§

fn from_residual(residual: Exit<!>) -> Self

🔬This is a nightly-only experimental API. (try_trait_v2)
Constructs the type from a compatible Residual type. Read more
Source§

impl<T: _T, Derive_TryConvert_ResultE: Into<Exit<!>>> FromResidual<Result<Infallible, Derive_TryConvert_ResultE>> for Exit<T>

Source§

fn from_residual( residual: Result<Infallible, Derive_TryConvert_ResultE>, ) -> Self

🔬This is a nightly-only experimental API. (try_trait_v2)
Constructs the type from a compatible Residual type. Read more
Source§

impl<T: Ord + _T> Ord for Exit<T>

Source§

fn cmp(&self, other: &Exit<T>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 (const: unstable) · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 (const: unstable) · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl<T: PartialEq + _T> PartialEq for Exit<T>

Source§

fn eq(&self, other: &Exit<T>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<T: PartialOrd + _T> PartialOrd for Exit<T>

Source§

fn partial_cmp(&self, other: &Exit<T>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<T: _T> Residual<T> for Exit<!>

Source§

type TryType = Exit<T>

🔬This is a nightly-only experimental API. (try_trait_v2_residual)
The “return” type of this meta-function.
Source§

impl<T: _T> Termination for Exit<T>

Source§

fn report(self) -> ExitCode

Is called to get the representation of the value as status code. This status code is returned to the operating system.
Source§

impl<T: _T> Try for Exit<T>

Source§

type Output = T

🔬This is a nightly-only experimental API. (try_trait_v2)
The type of the value produced by ? when not short-circuiting.
Source§

type Residual = Exit<!>

🔬This is a nightly-only experimental API. (try_trait_v2)
The type of the value passed to FromResidual::from_residual as part of ? when short-circuiting. Read more
Source§

fn from_output(output: Self::Output) -> Self

🔬This is a nightly-only experimental API. (try_trait_v2)
Constructs the type from its Output type. Read more
Source§

fn branch(self) -> ControlFlow<Self::Residual, Self::Output>

🔬This is a nightly-only experimental API. (try_trait_v2)
Used in ? to decide whether the operator should produce a value (because this returned ControlFlow::Continue) or propagate a value back to the caller (because this returned ControlFlow::Break). Read more
Source§

impl<T: Eq + _T> Eq for Exit<T>

Source§

impl<T: _T> StructuralPartialEq for Exit<T>

Auto Trait Implementations§

§

impl<T> Freeze for Exit<T>
where T: Freeze,

§

impl<T> RefUnwindSafe for Exit<T>
where T: RefUnwindSafe,

§

impl<T> Send for Exit<T>
where T: Send,

§

impl<T> Sync for Exit<T>
where T: Sync,

§

impl<T> Unpin for Exit<T>
where T: Unpin,

§

impl<T> UnsafeUnpin for Exit<T>
where T: UnsafeUnpin,

§

impl<T> UnwindSafe for Exit<T>
where T: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.