#[repr(u8)]pub enum Permissions {
NoAccess = 0,
WriteOnly = 2,
ReadOnly = 4,
ReadWrite = 6,
}Expand description
A set of permissions granted on a specific image location to a given set of credentials.
Variants§
NoAccess = 0
Access forbidden.
WriteOnly = 2
Write only access.
ReadOnly = 4
Read access.
ReadWrite = 6
Read and write access.
Implementations§
Source§impl Permissions
impl Permissions
Sourcepub fn has_read_permission(self) -> bool
pub fn has_read_permission(self) -> bool
Returns whether or not permissions include read access.
Sourcepub fn has_write_permission(self) -> bool
pub fn has_write_permission(self) -> bool
Returns whether or not permissions include write access.
Sourcepub fn require_read(self) -> Result<(), MissingPermission>
pub fn require_read(self) -> Result<(), MissingPermission>
Returns an error if no read permission is included.
Sourcepub fn require_write(self) -> Result<(), MissingPermission>
pub fn require_write(self) -> Result<(), MissingPermission>
Returns an error if no write permission is included.
Trait Implementations§
Source§impl AuthProvider for Permissions
impl AuthProvider for Permissions
Source§fn check_credentials<'life0, 'life1, 'async_trait>(
&'life0 self,
unverified: &'life1 Unverified,
) -> Pin<Box<dyn Future<Output = Option<ValidCredentials>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn check_credentials<'life0, 'life1, 'async_trait>(
&'life0 self,
unverified: &'life1 Unverified,
) -> Pin<Box<dyn Future<Output = Option<ValidCredentials>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Checks whether the supplied unverified credentials are valid. Read more
Source§fn image_permissions<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_creds: &'life1 ValidCredentials,
_image: &'life2 ImageLocation,
) -> Pin<Box<dyn Future<Output = Permissions> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn image_permissions<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_creds: &'life1 ValidCredentials,
_image: &'life2 ImageLocation,
) -> Pin<Box<dyn Future<Output = Permissions> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Determine permissions for given credentials at image location. Read more
Source§fn blob_permissions<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_creds: &'life1 ValidCredentials,
_blob: &'life2 ImageDigest,
) -> Pin<Box<dyn Future<Output = Permissions> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn blob_permissions<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_creds: &'life1 ValidCredentials,
_blob: &'life2 ImageDigest,
) -> Pin<Box<dyn Future<Output = Permissions> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Determine permissions for given credentials to a specific blob. Read more
Source§impl Clone for Permissions
impl Clone for Permissions
Source§fn clone(&self) -> Permissions
fn clone(&self) -> Permissions
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 Permissions
impl Debug for Permissions
Source§impl PartialEq for Permissions
impl PartialEq for Permissions
impl Copy for Permissions
impl Eq for Permissions
impl StructuralPartialEq for Permissions
Auto Trait Implementations§
impl Freeze for Permissions
impl RefUnwindSafe for Permissions
impl Send for Permissions
impl Sync for Permissions
impl Unpin for Permissions
impl UnwindSafe for Permissions
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