Struct tower_http::auth::require_authorization::Basic [−][src]
pub struct Basic<ResBody> { /* fields omitted */ }
This is supported on crate feature
auth
only.Expand description
Type that performs basic authorization.
See RequireAuthorization::basic
for more details.
Trait Implementations
impl<ResBody> AuthorizeRequest for Basic<ResBody> where
ResBody: Body + Default,
[src]
impl<ResBody> AuthorizeRequest for Basic<ResBody> where
ResBody: Body + Default,
[src]type ResponseBody = ResBody
type ResponseBody = ResBody
The body type used for responses to unauthorized requests.
fn authorize<B>(&mut self, request: &Request<B>) -> Option<Self::Output>
[src]
fn authorize<B>(&mut self, request: &Request<B>) -> Option<Self::Output>
[src]Authorize the request. Read more
fn unauthorized_response<B>(
&mut self,
_request: &Request<B>
) -> Response<Self::ResponseBody>
[src]
fn unauthorized_response<B>(
&mut self,
_request: &Request<B>
) -> Response<Self::ResponseBody>
[src]Create the response for an unauthorized request.
fn on_authorized<B>(&mut self, _request: &mut Request<B>, _output: Self::Output)
[src]
fn on_authorized<B>(&mut self, _request: &mut Request<B>, _output: Self::Output)
[src]Callback for when a request has been successfully authorized. Read more
Auto Trait Implementations
impl<ResBody> RefUnwindSafe for Basic<ResBody>
impl<ResBody> Send for Basic<ResBody>
impl<ResBody> Sync for Basic<ResBody>
impl<ResBody> Unpin for Basic<ResBody>
impl<ResBody> UnwindSafe for Basic<ResBody>
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]impl<T> PolicyExt for T where
T: ?Sized,
[src]
impl<T> PolicyExt for T where
T: ?Sized,
[src]impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more