Type Alias rocket::form::Result

source ·
pub type Result<'v, T> = Result<T, Errors<'v>>;
Expand description

Type alias for Result with an error type of Errors.

Aliased Type§

enum Result<'v, T> {
    Ok(T),
    Err(Errors<'v>),
}

Variants§

§1.0.0

Ok(T)

Contains the success value

§1.0.0

Err(Errors<'v>)

Contains the error value

Trait Implementations§

source§

impl<I, T: Contains<I>> Contains<I> for Result<'_, T>

source§

fn contains(&self, item: I) -> bool

Returns true if self contains item.
source§

impl<'v, T: FromForm<'v>> FromForm<'v> for Result<'v, T>

source§

type Context = <T as FromForm<'v>>::Context

The form guard’s parsing context.
source§

fn init(opts: Options) -> Self::Context

Initializes and returns the parsing context for Self.
source§

fn push_value(ctxt: &mut Self::Context, field: ValueField<'v>)

Processes the value field field.
source§

fn push_data<'life0, 'life1, 'async_trait>( ctxt: &'life0 mut Self::Context, field: DataField<'v, 'life1>, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'v: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Processes the data field field.
source§

fn finalize(this: Self::Context) -> Result<'v, Self>

Finalizes parsing. Returns the parsed value when successful or collection of Errors otherwise.
source§

fn push_error(_ctxt: &mut Self::Context, _error: Error<'r>)

Processes the external form or field error _error. Read more
source§

fn default(opts: Options) -> Option<Self>

Returns a default value, if any, to use when a value is desired and parsing fails. Read more
source§

impl<L, T: Len<L>> Len<L> for Result<'_, T>

source§

fn len(&self) -> L

The length of the value.
source§

fn len_into_u64(len: L) -> u64

Convert len into u64.
source§

fn zero_len() -> L

The zero value for L.