ErrorInto

Struct ErrorInto 

Source
pub struct ErrorInto<E, Error>(/* private fields */);
Expand description

A simple wrapper around an Endpoint to change it’s error type into anything Into-able.

Implementations§

Source§

impl<E, Error> ErrorInto<E, Error>

Source

pub fn new(endpoint: E) -> Self

Create a new ErrorInto wrapping the supplied endpoint.

Trait Implementations§

Source§

impl<E, Error, W> Endpoint<W> for ErrorInto<E, Error>
where E: Endpoint<W>, E::Error: Into<Error>, W: WebRequest,

Source§

type Error = Error

The error typed used as the error representation of each flow.
Source§

fn registrar(&self) -> Option<&dyn Registrar>

A registrar if this endpoint can access one. Read more
Source§

fn authorizer_mut(&mut self) -> Option<&mut dyn Authorizer>

An authorizer if this endpoint can access one. Read more
Source§

fn issuer_mut(&mut self) -> Option<&mut dyn Issuer>

An issuer if this endpoint can access one. Read more
Source§

fn owner_solicitor(&mut self) -> Option<&mut dyn OwnerSolicitor<W>>

Return the system that checks owner consent. Read more
Source§

fn scopes(&mut self) -> Option<&mut dyn Scopes<W>>

Determine the required scopes for a request. Read more
Source§

fn response( &mut self, request: &mut W, kind: Template<'_>, ) -> Result<W::Response, Self::Error>

Generate a prototype response. Read more
Source§

fn error(&mut self, err: OAuthError) -> Self::Error

Wrap an error.
Source§

fn web_error(&mut self, err: W::Error) -> Self::Error

Wrap an error in the request/response types.
Source§

fn extension(&mut self) -> Option<&mut dyn Extension>

Get the central extension instance this endpoint. Read more

Auto Trait Implementations§

§

impl<E, Error> Freeze for ErrorInto<E, Error>
where E: Freeze,

§

impl<E, Error> RefUnwindSafe for ErrorInto<E, Error>
where E: RefUnwindSafe, Error: RefUnwindSafe,

§

impl<E, Error> Send for ErrorInto<E, Error>
where E: Send, Error: Send,

§

impl<E, Error> Sync for ErrorInto<E, Error>
where E: Sync, Error: Sync,

§

impl<E, Error> Unpin for ErrorInto<E, Error>
where E: Unpin, Error: Unpin,

§

impl<E, Error> UnwindSafe for ErrorInto<E, Error>
where E: UnwindSafe, Error: 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> Same for T

Source§

type Output = T

Should always be Self
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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V