Skip to main content

AppResultWithState

Enum AppResultWithState 

Source
pub enum AppResultWithState<S: AppState> {
    Continue(S),
    Success(Option<S>),
    Failure(Option<S>),
}
Expand description

An AppResult with an app state, for returning from the function tagged with app_init.

Variants§

§

Continue(S)

Continue running

§

Success(Option<S>)

Quit with success status

§

Failure(Option<S>)

Quit with failure status

Implementations§

Trait Implementations§

Source§

impl<S: Debug + AppState> Debug for AppResultWithState<S>

Source§

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

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

impl<S: AppState> FromResidual<Option<Infallible>> for AppResultWithState<S>

Available on crate feature nightly only.
Source§

fn from_residual(_residual: Option<Infallible>) -> Self

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

impl<S: AppState, E: Display> FromResidual<Result<Infallible, E>> for AppResultWithState<S>

Available on crate features nightly and log-errors only.
Source§

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

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

Auto Trait Implementations§

§

impl<S> Freeze for AppResultWithState<S>
where S: Freeze,

§

impl<S> RefUnwindSafe for AppResultWithState<S>
where S: RefUnwindSafe,

§

impl<S> Send for AppResultWithState<S>

§

impl<S> Sync for AppResultWithState<S>

§

impl<S> Unpin for AppResultWithState<S>
where S: Unpin,

§

impl<S> UnsafeUnpin for AppResultWithState<S>
where S: UnsafeUnpin,

§

impl<S> UnwindSafe for AppResultWithState<S>
where S: 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.