pub struct UserIdentity {
pub username: String,
pub admin: bool,
pub blobs_whitelist: Option<Vec<String>>,
}Expand description
Represents a user identity.
This is the body of user tokens.
Fields§
§username: String§admin: bool§blobs_whitelist: Option<Vec<String>>Trait Implementations§
Source§impl Clone for UserIdentity
impl Clone for UserIdentity
Source§fn clone(&self) -> UserIdentity
fn clone(&self) -> UserIdentity
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for UserIdentity
impl Debug for UserIdentity
Source§impl<'de> Deserialize<'de> for UserIdentity
impl<'de> Deserialize<'de> for UserIdentity
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<B: Send> FromRequest<B> for UserIdentity
impl<B: Send> FromRequest<B> for UserIdentity
Source§type Rejection = HTTPError
type Rejection = HTTPError
If the extractor fails it’ll use this “rejection” type. A rejection is
a kind of error that can be converted into a response.
Source§fn from_request<'life0, 'async_trait>(
req: &'life0 mut RequestParts<B>,
) -> Pin<Box<dyn Future<Output = Result<Self, Self::Rejection>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn from_request<'life0, 'async_trait>(
req: &'life0 mut RequestParts<B>,
) -> Pin<Box<dyn Future<Output = Result<Self, Self::Rejection>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Perform the extraction.
Auto Trait Implementations§
impl Freeze for UserIdentity
impl RefUnwindSafe for UserIdentity
impl Send for UserIdentity
impl Sync for UserIdentity
impl Unpin for UserIdentity
impl UnwindSafe for UserIdentity
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