Type Alias rocket::data::Transformed

source ·
pub type Transformed<'a, T> = Transform<Outcome<<T as FromData<'a>>::Owned, <T as FromData<'a>>::Error>, Outcome<&'a <T as FromData<'a>>::Borrowed, <T as FromData<'a>>::Error>>;
Expand description

Type alias to the outcome input type of FromData::from_data.

This is a hairy type, but the gist is that this is a Transform where, for a given T: FromData:

  • The Owned variant is an Outcome whose Success value is of type FromData::Owned.

  • The Borrowed variant is an Outcome whose Success value is a borrow of type FromData::Borrowed.

  • In either case, the Outcome’s Failure variant is a value of type FromData::Error.

Aliased Type§

enum Transformed<'a, T> {
    Owned(Outcome<<T as FromData<'a>>::Owned, (Status, <T as FromData<'a>>::Error), Data>),
    Borrowed(Outcome<&'a <T as FromData<'a>>::Borrowed, (Status, <T as FromData<'a>>::Error), Data>),
}

Variants§

§

Owned(Outcome<<T as FromData<'a>>::Owned, (Status, <T as FromData<'a>>::Error), Data>)

Indicates that data should be or has been transformed into the FromData::Owned variant.

§

Borrowed(Outcome<&'a <T as FromData<'a>>::Borrowed, (Status, <T as FromData<'a>>::Error), Data>)

Indicates that data should be or has been transformed into the FromData::Borrowed variant.