Skip to main content

AccessLevel

Trait AccessLevel 

Source
pub trait AccessLevel:
    Copy
    + Clone
    + PartialOrd
    + Ord
    + 'static {
    // Required methods
    fn from_str(s: &str) -> Option<Self>
       where Self: Sized;
    fn as_str(&self) -> &'static str;
}
Expand description

Access level trait for hierarchical permissions. Implement this trait to define your application’s access hierarchy.

Required Methods§

Source

fn from_str(s: &str) -> Option<Self>
where Self: Sized,

Parse access level from string.

Source

fn as_str(&self) -> &'static str

Convert access level to string representation.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§