Skip to main content

TryResult

Type Alias TryResult 

Source
pub type TryResult<'a, T> = ControlFlow<TryError<'a>, T>;
Expand description

Result of methods that are not allowed to call JavaScript or perform garbage collection.

Aliased Type§

pub enum TryResult<'a, T> {
    Continue(T),
    Break(TryError<'a>),
}

Variants§

§1.55.0

Continue(T)

Move on to the next phase of the operation as normal.

§1.55.0

Break(TryError<'a>)

Exit the operation without running subsequent phases.

Trait Implementations§

Source§

impl<'a, T: 'a> From<JsError<'a>> for TryResult<'a, T>

Source§

fn from(value: JsError<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<SetResult<'a>> for TryResult<'a, SetResult<'a>>

Source§

fn from(value: SetResult<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a, T: 'a> From<TryError<'a>> for TryResult<'a, T>

Source§

fn from(value: TryError<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<TryGetResult<'a>> for TryResult<'a, TryGetResult<'a>>

Source§

fn from(value: TryGetResult<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<TryHasResult<'a>> for TryResult<'a, TryHasBindingContinue<'a>>

Source§

fn from(value: TryHasResult<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<TryHasResult<'a>> for TryResult<'a, TryHasResult<'a>>

Source§

fn from(value: TryHasResult<'a>) -> Self

Converts to this type from the input type.