pub struct Capabilities { /* private fields */ }Expand description
The set of capabilities and associated information granted by an authorization token.
Implementations§
Source§impl Capabilities
impl Capabilities
Sourcepub fn capabilities(&self) -> &[Capability]
pub fn capabilities(&self) -> &[Capability]
The list of capabilities granted.
Sourcepub fn bucket_id(&self) -> Option<&String>
pub fn bucket_id(&self) -> Option<&String>
If the capabilities are limited to a single bucket, this is the bucket’s ID.
Sourcepub fn bucket_name(&self) -> Option<&String>
pub fn bucket_name(&self) -> Option<&String>
If the bucket is valid and hasn’t been deleted, the name of the bucket
corresponding to bucket_id. If the bucket referred to by bucket_id
no longer exists, this will be None.
Sourcepub fn name_prefix(&self) -> Option<&String>
pub fn name_prefix(&self) -> Option<&String>
If set, access is limited to files whose names begin with this prefix.
Sourcepub fn has_capability(&self, cap: Capability) -> bool
pub fn has_capability(&self, cap: Capability) -> bool
Check if the provided capability is granted to the object containing this Capabilities object.
Trait Implementations§
Source§impl Clone for Capabilities
impl Clone for Capabilities
Source§fn clone(&self) -> Capabilities
fn clone(&self) -> Capabilities
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 Capabilities
impl Debug for Capabilities
Source§impl<'de> Deserialize<'de> for Capabilities
impl<'de> Deserialize<'de> for Capabilities
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Capabilities
impl RefUnwindSafe for Capabilities
impl Send for Capabilities
impl Sync for Capabilities
impl Unpin for Capabilities
impl UnwindSafe for Capabilities
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