pub struct CachedUser {
pub user_id: Option<String>,
pub traffic_limit: i64,
pub traffic_used: i64,
pub expires_at: i64,
pub enabled: bool,
pub cached_at: Instant,
}Expand description
Cached user data.
Fields§
§user_id: Option<String>User ID (optional identifier).
traffic_limit: i64Traffic limit in bytes (0 = unlimited).
traffic_used: i64Traffic used in bytes.
expires_at: i64Expiration timestamp (0 = never).
enabled: boolWhether the user is enabled.
cached_at: InstantWhen this cache entry was created.
Trait Implementations§
Source§impl Clone for CachedUser
impl Clone for CachedUser
Source§fn clone(&self) -> CachedUser
fn clone(&self) -> CachedUser
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 CachedUser
impl Debug for CachedUser
Source§impl From<CachedUser> for UserRecord
impl From<CachedUser> for UserRecord
Source§fn from(cached: CachedUser) -> Self
fn from(cached: CachedUser) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for CachedUser
impl RefUnwindSafe for CachedUser
impl Send for CachedUser
impl Sync for CachedUser
impl Unpin for CachedUser
impl UnsafeUnpin for CachedUser
impl UnwindSafe for CachedUser
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