Struct oxide_auth_actix::OAuthResource
source · [−]pub struct OAuthResource { /* private fields */ }
Expand description
Type implementing WebRequest
as well as FromRequest
for use in guarding resources
This is useful over OAuthRequest since OAuthResource doesn’t consume the body of the request upon extraction
Implementations
sourceimpl OAuthResource
impl OAuthResource
sourcepub fn new(req: &HttpRequest) -> Result<Self, WebError>
pub fn new(req: &HttpRequest) -> Result<Self, WebError>
Create a new OAuthResource from an HttpRequest
sourcepub fn into_request(self) -> OAuthRequest
pub fn into_request(self) -> OAuthRequest
Turn this OAuthResource into an OAuthRequest for processing
Trait Implementations
sourceimpl From<OAuthResource> for OAuthRequest
impl From<OAuthResource> for OAuthRequest
sourcefn from(o: OAuthResource) -> Self
fn from(o: OAuthResource) -> Self
Performs the conversion.
sourceimpl FromRequest for OAuthResource
impl FromRequest for OAuthResource
sourcefn from_request(req: &HttpRequest, _: &mut Payload) -> Self::Future
fn from_request(req: &HttpRequest, _: &mut Payload) -> Self::Future
Create a Self from request parts asynchronously.
sourcefn extract(req: &HttpRequest) -> Self::Future
fn extract(req: &HttpRequest) -> Self::Future
Create a Self from request head asynchronously. Read more
Auto Trait Implementations
impl RefUnwindSafe for OAuthResource
impl Send for OAuthResource
impl Sync for OAuthResource
impl Unpin for OAuthResource
impl UnwindSafe for OAuthResource
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
pub fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more