pub struct RosterEntry {
pub identity_hash: String,
pub role: Role,
pub label: String,
/* private fields */
}Expand description
A single identity’s role assignment with optional explicit grants.
Fields§
§identity_hash: String32-char hex identity hash (lowercase).
role: RoleAssigned role tier.
label: StringHuman-readable label (optional).
Implementations§
Source§impl RosterEntry
impl RosterEntry
pub fn new(identity_hash: impl Into<String>, role: Role) -> Self
pub fn with_label(self, label: impl Into<String>) -> Self
pub fn with_grants(self, grants: Vec<String>) -> Self
Sourcepub fn has_capability(&self, cap: &str) -> bool
pub fn has_capability(&self, cap: &str) -> bool
Check whether this entry holds a specific capability (via role or grant).
Trait Implementations§
Source§impl Clone for RosterEntry
impl Clone for RosterEntry
Source§fn clone(&self) -> RosterEntry
fn clone(&self) -> RosterEntry
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 moreAuto Trait Implementations§
impl Freeze for RosterEntry
impl RefUnwindSafe for RosterEntry
impl Send for RosterEntry
impl Sync for RosterEntry
impl Unpin for RosterEntry
impl UnsafeUnpin for RosterEntry
impl UnwindSafe for RosterEntry
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