#[non_exhaustive]pub enum Authorization<'a> {
None,
Username(Cow<'a, str>),
UsernamePassword(Cow<'a, str>, Cow<'a, [u8]>),
}Expand description
Authorization information from the request
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
None
None present
Username(Cow<'a, str>)
Only a username
UsernamePassword(Cow<'a, str>, Cow<'a, [u8]>)
Username and password combination
Auto Trait Implementations§
impl<'a> Freeze for Authorization<'a>
impl<'a> RefUnwindSafe for Authorization<'a>
impl<'a> Send for Authorization<'a>
impl<'a> Sync for Authorization<'a>
impl<'a> Unpin for Authorization<'a>
impl<'a> UnwindSafe for Authorization<'a>
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