Struct garage_model::permission::BucketKeyPerm
source · pub struct BucketKeyPerm {
pub timestamp: u64,
pub allow_read: bool,
pub allow_write: bool,
pub allow_owner: bool,
}
Expand description
Permission given to a key in a bucket
Fields§
§timestamp: u64
Timestamp at which the permission was given
allow_read: bool
The key can be used to read the bucket
allow_write: bool
The key can be used to write objects to the bucket
allow_owner: bool
The key can be used to control other aspects of the bucket:
- enable / disable website access
- delete bucket
Implementations§
source§impl BucketKeyPerm
impl BucketKeyPerm
pub const NO_PERMISSIONS: Self = _
pub const ALL_PERMISSIONS: Self = _
pub fn is_any(&self) -> bool
Trait Implementations§
source§impl Clone for BucketKeyPerm
impl Clone for BucketKeyPerm
source§fn clone(&self) -> BucketKeyPerm
fn clone(&self) -> BucketKeyPerm
Returns a copy 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 Crdt for BucketKeyPerm
impl Crdt for BucketKeyPerm
source§impl Debug for BucketKeyPerm
impl Debug for BucketKeyPerm
source§impl<'de> Deserialize<'de> for BucketKeyPerm
impl<'de> Deserialize<'de> for BucketKeyPerm
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
source§impl Ord for BucketKeyPerm
impl Ord for BucketKeyPerm
source§fn cmp(&self, other: &BucketKeyPerm) -> Ordering
fn cmp(&self, other: &BucketKeyPerm) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for BucketKeyPerm
impl PartialEq for BucketKeyPerm
source§fn eq(&self, other: &BucketKeyPerm) -> bool
fn eq(&self, other: &BucketKeyPerm) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for BucketKeyPerm
impl PartialOrd for BucketKeyPerm
source§fn partial_cmp(&self, other: &BucketKeyPerm) -> Option<Ordering>
fn partial_cmp(&self, other: &BucketKeyPerm) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for BucketKeyPerm
impl Serialize for BucketKeyPerm
impl Copy for BucketKeyPerm
impl Eq for BucketKeyPerm
impl StructuralPartialEq for BucketKeyPerm
Auto Trait Implementations§
impl Freeze for BucketKeyPerm
impl RefUnwindSafe for BucketKeyPerm
impl Send for BucketKeyPerm
impl Sync for BucketKeyPerm
impl Unpin for BucketKeyPerm
impl UnwindSafe for BucketKeyPerm
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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.