pub struct AuthorizedUrl {
pub url: String,
pub token: String,
pub expires: i64,
}Expand description
A server URL with the token that opens it, for code that fetches the file itself
(a video player, a browser). Send the token in a header with
Self::authorization, or in the URL with Self::with_token_query when the
fetcher cannot set headers. The token expires at Self::expires: ask for a new
URL before then.
Fields§
§url: StringThe URL, without the token.
token: StringThe server token.
expires: i64When the token expires, in Unix milliseconds.
Implementations§
Source§impl AuthorizedUrl
impl AuthorizedUrl
The Authorization header value: Bearer <token>.
Sourcepub fn with_token_query(&self) -> String
pub fn with_token_query(&self) -> String
The URL with the token in its token query parameter, which the server also
reads.
Trait Implementations§
Source§impl Clone for AuthorizedUrl
impl Clone for AuthorizedUrl
Source§impl Debug for AuthorizedUrl
impl Debug for AuthorizedUrl
impl Eq for AuthorizedUrl
Source§impl PartialEq for AuthorizedUrl
impl PartialEq for AuthorizedUrl
impl StructuralPartialEq for AuthorizedUrl
Auto Trait Implementations§
impl Forget for AuthorizedUrl
impl Freeze for AuthorizedUrl
impl Move for AuthorizedUrl
impl RefUnwindSafe for AuthorizedUrl
impl Send for AuthorizedUrlwhere
RawVecInner: Send,
impl Sync for AuthorizedUrlwhere
RawVecInner: Sync,
impl Unpin for AuthorizedUrl
impl UnsafeUnpin for AuthorizedUrl
impl UnwindSafe for AuthorizedUrlwhere
RawVecInner: UnwindSafe,
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.