Struct b2_client::account::Authorization
source · [−]pub struct Authorization<C> where
C: HttpClient, { /* private fields */ }Expand description
Authorization token and related information obtained from authorize_account.
The token is valid for no more than 24 hours.
Implementations
sourceimpl<C> Authorization<C> where
C: HttpClient,
impl<C> Authorization<C> where
C: HttpClient,
sourcepub fn account_id(&self) -> &str
pub fn account_id(&self) -> &str
The ID for the account.
sourcepub fn capabilities(&self) -> &Capabilities
pub fn capabilities(&self) -> &Capabilities
The capabilities granted to this auth token.
sourcepub fn recommended_part_size(&self) -> u64
pub fn recommended_part_size(&self) -> u64
The recommended size in bytes for each part of a large file.
sourcepub fn minimum_part_size(&self) -> u64
pub fn minimum_part_size(&self) -> u64
The smallest possible size in bytes of a part of a large file, except the final part.
pub fn has_capability(&self, cap: Capability) -> bool
Trait Implementations
sourceimpl<C: Debug> Debug for Authorization<C> where
C: HttpClient,
impl<C: Debug> Debug for Authorization<C> where
C: HttpClient,
sourceimpl<'a, C> From<&'a mut Authorization<C>> for DownloadAuth<'a, C> where
C: HttpClient,
impl<'a, C> From<&'a mut Authorization<C>> for DownloadAuth<'a, C> where
C: HttpClient,
sourcefn from(auth: &'a mut Authorization<C>) -> Self
fn from(auth: &'a mut Authorization<C>) -> Self
Performs the conversion.
Auto Trait Implementations
impl<C> RefUnwindSafe for Authorization<C> where
C: RefUnwindSafe,
impl<C> Send for Authorization<C> where
C: Send,
impl<C> Sync for Authorization<C> where
C: Sync,
impl<C> Unpin for Authorization<C> where
C: Unpin,
impl<C> UnwindSafe for Authorization<C> where
C: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more