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§
source§impl 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§
source§impl From<OAuthResource> for OAuthRequest
impl From<OAuthResource> for OAuthRequest
source§fn from(o: OAuthResource) -> Self
fn from(o: OAuthResource) -> Self
Converts to this type from the input type.
source§impl FromRequest for OAuthResource
impl FromRequest for OAuthResource
§type Future = Ready<Result<OAuthResource, <OAuthResource as FromRequest>::Error>>
type Future = Ready<Result<OAuthResource, <OAuthResource as FromRequest>::Error>>
Future that resolves to a
Self
. Read moresource§fn from_request(req: &HttpRequest, _: &mut Payload) -> Self::Future
fn from_request(req: &HttpRequest, _: &mut Payload) -> Self::Future
Create a
Self
from request parts asynchronously.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§
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