#[non_exhaustive]pub enum AclMode {
Read,
Write,
}Expand description
A WAC access mode a manifest may grant: "Read" or "Write".
Append and Control are not grantable: an application key never holds
Control, so it can never change an ACL.
§Examples
use stratum_node_core::AclMode;
assert_eq!(serde_json::to_string(&AclMode::Read)?, "\"Read\"");
assert!(serde_json::from_str::<AclMode>("\"Control\"").is_err());
assert_eq!(AclMode::Write.iri(), "acl:Write");Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Implementations§
Trait Implementations§
impl Copy for AclMode
Source§impl<'de> Deserialize<'de> for AclMode
impl<'de> Deserialize<'de> for AclMode
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
impl Eq for AclMode
Source§impl Ord for AclMode
impl Ord for AclMode
1.21.0 (const: unstable) · 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
1.21.0 (const: unstable) · Source§fn 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
Source§impl PartialOrd for AclMode
impl PartialOrd for AclMode
impl StructuralPartialEq for AclMode
Auto Trait Implementations§
impl Forget for AclMode
impl Freeze for AclMode
impl Move for AclMode
impl RefUnwindSafe for AclMode
impl Send for AclMode
impl Sync for AclMode
impl Unpin for AclMode
impl UnsafeUnpin for AclMode
impl UnwindSafe for AclMode
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