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
sourceimpl BucketKeyPerm
impl BucketKeyPerm
pub const NO_PERMISSIONS: Self = _
pub const ALL_PERMISSIONS: Self = _
pub fn is_any(&self) -> bool
Trait Implementations
sourceimpl Clone for BucketKeyPerm
impl Clone for BucketKeyPerm
sourcefn clone(&self) -> BucketKeyPerm
fn clone(&self) -> BucketKeyPerm
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Crdt for BucketKeyPerm
impl Crdt for BucketKeyPerm
sourceimpl Debug for BucketKeyPerm
impl Debug for BucketKeyPerm
sourceimpl<'de> Deserialize<'de> for BucketKeyPerm
impl<'de> Deserialize<'de> for BucketKeyPerm
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
sourceimpl Ord for BucketKeyPerm
impl Ord for BucketKeyPerm
sourcefn cmp(&self, other: &BucketKeyPerm) -> Ordering
fn cmp(&self, other: &BucketKeyPerm) -> Ordering
1.21.0 · sourcefn 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
1.21.0 · sourcefn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialEq<BucketKeyPerm> for BucketKeyPerm
impl PartialEq<BucketKeyPerm> for BucketKeyPerm
sourcefn eq(&self, other: &BucketKeyPerm) -> bool
fn eq(&self, other: &BucketKeyPerm) -> bool
sourceimpl PartialOrd<BucketKeyPerm> for BucketKeyPerm
impl PartialOrd<BucketKeyPerm> for BucketKeyPerm
sourcefn partial_cmp(&self, other: &BucketKeyPerm) -> Option<Ordering>
fn partial_cmp(&self, other: &BucketKeyPerm) -> Option<Ordering>
1.0.0 · sourcefn 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 moresourceimpl Serialize for BucketKeyPerm
impl Serialize for BucketKeyPerm
impl Copy for BucketKeyPerm
impl Eq for BucketKeyPerm
impl StructuralEq for BucketKeyPerm
impl StructuralPartialEq for BucketKeyPerm
Auto Trait Implementations
impl RefUnwindSafe for BucketKeyPerm
impl Send for BucketKeyPerm
impl Sync for BucketKeyPerm
impl Unpin for BucketKeyPerm
impl UnwindSafe for BucketKeyPerm
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more