pub struct TokenRecord {
pub profile_id: ProfileId,
pub bucket: BucketId,
pub key: String,
pub region: String,
pub expires_at: i64,
pub session_id: String,
}Expand description
Everything the server needs to serve a single media token.
Fields§
§profile_id: ProfileIdProfile whose credentials are used to fetch the object.
bucket: BucketIdS3 bucket containing the object.
key: StringFull S3 object key.
region: StringAWS region for the bucket (needed to route the get_object call).
expires_at: i64Unix epoch seconds at which this token expires.
session_id: StringSession that minted this token; used by TokenRegistry::revoke_session.
Implementations§
Source§impl TokenRecord
impl TokenRecord
Sourcepub fn is_expired(&self) -> bool
pub fn is_expired(&self) -> bool
Returns true when the token has passed its expiry time.
Trait Implementations§
Source§impl Clone for TokenRecord
impl Clone for TokenRecord
Source§fn clone(&self) -> TokenRecord
fn clone(&self) -> TokenRecord
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 moreAuto Trait Implementations§
impl Freeze for TokenRecord
impl RefUnwindSafe for TokenRecord
impl Send for TokenRecord
impl Sync for TokenRecord
impl Unpin for TokenRecord
impl UnsafeUnpin for TokenRecord
impl UnwindSafe for TokenRecord
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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 moreCreates a shared type from an unshared type.