pub struct Extended<Inner, Extension> {
    pub inner: Inner,
    pub addons: Extension,
}
Expand description

An inner endpoint with simple extensions.

If the inner endpoint had any extension, it will simply never be provided to any flow and overwritten. Therefore, this is mainly useful for other endpoints that did not implement extensions by themselves such as frontends::simple::endpoint::Generic.

Fields§

§inner: Inner

Endpoint being extended. This field is pub for oxide-auth-async be able to implement async version of some traits.

§addons: Extension

Extensions of the endpoint. This field is pub for oxide-auth-async be able to implement async version of some traits.

Implementations§

source§

impl<Inner> Extended<Inner, AddonList>

source

pub fn new(inner: Inner) -> Self

Wrap an endpoint with a standard extension system.

source§

impl<Inner, E> Extended<Inner, E>

source

pub fn extend_with(inner: Inner, extension: E) -> Self

Wrap an inner endpoint with a preconstructed extension instance.

source

pub fn extension(&self) -> &E

A reference to the extension.

source

pub fn extension_mut(&mut self) -> &mut E

A mutable reference to the extension.

Trait Implementations§

source§

impl<Request, Inner, Ext> Endpoint<Request> for Extended<Inner, Ext>where Request: WebRequest, Inner: Endpoint<Request>, Ext: Extension,

§

type Error = <Inner as Endpoint<Request>>::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<Request>>

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

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

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

fn response( &mut self, request: &mut Request, kind: Template<'_> ) -> Result<Request::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: Request::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<Inner, Extension> RefUnwindSafe for Extended<Inner, Extension>where Extension: RefUnwindSafe, Inner: RefUnwindSafe,

§

impl<Inner, Extension> Send for Extended<Inner, Extension>where Extension: Send, Inner: Send,

§

impl<Inner, Extension> Sync for Extended<Inner, Extension>where Extension: Sync, Inner: Sync,

§

impl<Inner, Extension> Unpin for Extended<Inner, Extension>where Extension: Unpin, Inner: Unpin,

§

impl<Inner, Extension> UnwindSafe for Extended<Inner, Extension>where Extension: UnwindSafe, Inner: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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 Twhere 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<T> for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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.
§

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

§

fn vzip(self) -> V