Struct oxide_auth::frontends::simple::extensions::Extended
source · 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, E> Extended<Inner, E>
impl<Inner, E> Extended<Inner, E>
sourcepub fn extend_with(inner: Inner, extension: E) -> Self
pub fn extend_with(inner: Inner, extension: E) -> Self
Wrap an inner endpoint with a preconstructed extension instance.
sourcepub fn extension_mut(&mut self) -> &mut E
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,
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
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>
fn registrar(&self) -> Option<&dyn Registrar>
A registrar if this endpoint can access one. Read more
An authorizer if this endpoint can access one. Read more
source§fn issuer_mut(&mut self) -> Option<&mut dyn Issuer>
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>>
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>>
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>
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
fn error(&mut self, err: OAuthError) -> Self::Error
Wrap an error.
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more