pub enum CallerRole {
Observer,
Dev,
Admin,
Boot,
}Expand description
Caller privilege tier, ordered least to most privileged.
Variant order is the privilege order and Ord is derived from it, so
caller >= required is the authorization comparison. This mirrors what
v0.2.10 did for PlanRiskLevel; CallerRole kept a hand-written
role_rank match until now, which is a second encoding of the same
ordering that could drift from this declaration.
Adding a variant means placing it at the correct privilege position, not appending it.
Variants§
Trait Implementations§
Source§impl Clone for CallerRole
impl Clone for CallerRole
Source§fn clone(&self) -> CallerRole
fn clone(&self) -> CallerRole
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 moreimpl Copy for CallerRole
Source§impl Debug for CallerRole
impl Debug for CallerRole
Source§impl<'de> Deserialize<'de> for CallerRole
impl<'de> Deserialize<'de> for CallerRole
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 CallerRole
Source§impl From<CallerRole> for CallerRole
impl From<CallerRole> for CallerRole
Source§fn from(value: CallerRole) -> Self
fn from(value: CallerRole) -> Self
Converts to this type from the input type.
Source§impl Ord for CallerRole
impl Ord for CallerRole
Source§fn cmp(&self, other: &CallerRole) -> Ordering
fn cmp(&self, other: &CallerRole) -> Ordering
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
Source§impl PartialEq for CallerRole
impl PartialEq for CallerRole
Source§impl PartialOrd for CallerRole
impl PartialOrd for CallerRole
Source§impl Serialize for CallerRole
impl Serialize for CallerRole
impl StructuralPartialEq for CallerRole
Source§impl TryFrom<CallerRole> for CallerRole
impl TryFrom<CallerRole> for CallerRole
Source§type Error = BridgeError
type Error = BridgeError
The type returned in the event of a conversion error.
Auto Trait Implementations§
impl Freeze for CallerRole
impl RefUnwindSafe for CallerRole
impl Send for CallerRole
impl Sync for CallerRole
impl Unpin for CallerRole
impl UnsafeUnpin for CallerRole
impl UnwindSafe for CallerRole
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