Struct oxide_auth::code_grant::accesstoken::PrimitiveError[][src]

pub struct PrimitiveError {
    pub grant: Option<Grant>,
    pub extensions: Option<Extensions>,
}
Expand description

The endpoint should have enough control over its primitives to find out what has gone wrong, e.g. they may externall supply error information.

In this case, all previous results returned by the primitives are included in the return value. Through this mechanism, one can accomodate async handlers by implementing a sync-based result cache that is filled with these partial values. In case only parts of the outstanding futures, invoked during internal calls, are ready the cache can be refilled through the error eliminating polls to already sucessful futures.

Note that token is not included in this list, since the handler can never fail after supplying a token to the backend.

Fields

grant: Option<Grant>

The already extracted grant.

You may reuse this, or more precisely you must to fulfill this exact request in case of an error recovery attempt.

extensions: Option<Extensions>

The extensions that were computed.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.