pub enum RbacProfile {
ReadOnly,
ReadWrite,
}Variants§
Implementations§
Source§impl RbacProfile
impl RbacProfile
pub fn as_str(self) -> &'static str
pub fn capabilities(self) -> &'static [RbacCapability]
pub fn allows_write(self) -> bool
Sourcepub fn derive_role_key(self, root_key: &VaultKey) -> SafeResult<VaultKey>
pub fn derive_role_key(self, root_key: &VaultKey) -> SafeResult<VaultKey>
Derive a role-scoped 256-bit key from the root vault key.
This does not change the on-disk vault format by itself. It gives later enforcement work a stable, domain-separated key identity for each access profile without reusing the root key directly.
pub fn ensure_write_allowed(self) -> SafeResult<()>
Trait Implementations§
Source§impl Clone for RbacProfile
impl Clone for RbacProfile
Source§fn clone(&self) -> RbacProfile
fn clone(&self) -> RbacProfile
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 RbacProfile
impl Debug for RbacProfile
Source§impl Default for RbacProfile
impl Default for RbacProfile
Source§fn default() -> RbacProfile
fn default() -> RbacProfile
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for RbacProfile
impl<'de> Deserialize<'de> for RbacProfile
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 PartialEq for RbacProfile
impl PartialEq for RbacProfile
Source§fn eq(&self, other: &RbacProfile) -> bool
fn eq(&self, other: &RbacProfile) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for RbacProfile
impl Serialize for RbacProfile
impl Copy for RbacProfile
impl Eq for RbacProfile
impl StructuralPartialEq for RbacProfile
Auto Trait Implementations§
impl Freeze for RbacProfile
impl RefUnwindSafe for RbacProfile
impl Send for RbacProfile
impl Sync for RbacProfile
impl Unpin for RbacProfile
impl UnsafeUnpin for RbacProfile
impl UnwindSafe for RbacProfile
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.