pub struct DbUser {
pub uuid: Uuid,
pub username: String,
pub token: Option<Uuid>,
pub token_expire: NaiveDateTime,
pub email: Option<String>,
}
Fields§
§uuid: Uuid
§username: String
§token: Option<Uuid>
§token_expire: NaiveDateTime
§email: Option<String>
Implementations§
Source§impl DbUser
impl DbUser
pub async fn get_token(&self, pool: &PgPool) -> Result<DbAuthToken, Error>
pub async fn token_status(&self, pool: &PgPool) -> TokenStatus
pub async fn get_counters( &self, pool: &PgPool, ) -> Result<Vec<DbCounter>, AuthorizationError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DbUser
impl RefUnwindSafe for DbUser
impl Send for DbUser
impl Sync for DbUser
impl Unpin for DbUser
impl UnwindSafe for DbUser
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more