pub struct Key { /* private fields */ }Expand description
An application key and associated information.
Implementations
sourceimpl Key
impl Key
sourcepub fn capabilities(&self) -> &[Capability]
pub fn capabilities(&self) -> &[Capability]
The list of capabilities granted by this key.
sourcepub fn account_id(&self) -> &str
pub fn account_id(&self) -> &str
The account this key is for.
sourcepub fn bucket_id(&self) -> Option<&String>
pub fn bucket_id(&self) -> Option<&String>
If present, this key’s capabilities are restricted to the returned bucket.
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 expiration(&self) -> Option<DateTime<Utc>>
pub fn expiration(&self) -> Option<DateTime<Utc>>
If present, the expiration date and time of this key.
sourcepub fn has_capability(&self, cap: Capability) -> bool
pub fn has_capability(&self, cap: Capability) -> bool
Check if the provided capability is granted by this key.
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Key
impl<'de> Deserialize<'de> for Key
sourcefn 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 RefUnwindSafe for Key
impl Send for Key
impl Sync for Key
impl Unpin for Key
impl UnwindSafe for Key
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more