pub struct PrincipalSet(/* private fields */);Expand description
The principals a request acts as: distinct ids, at most
MAX_SUBJECT_PRINCIPALS of them.
Implementations§
Source§impl PrincipalSet
impl PrincipalSet
Sourcepub fn new(principals: BTreeSet<PrincipalId>) -> Result<Self, PrincipalSetError>
pub fn new(principals: BTreeSet<PrincipalId>) -> Result<Self, PrincipalSetError>
Rejects sets larger than MAX_SUBJECT_PRINCIPALS.
Sourcepub fn iter(&self) -> impl Iterator<Item = &PrincipalId>
pub fn iter(&self) -> impl Iterator<Item = &PrincipalId>
The ids in principal order.
Sourcepub fn contains(&self, principal_id: &PrincipalId) -> bool
pub fn contains(&self, principal_id: &PrincipalId) -> bool
Whether the request acts as principal_id.
Trait Implementations§
Source§impl Clone for PrincipalSet
impl Clone for PrincipalSet
Source§impl Debug for PrincipalSet
impl Debug for PrincipalSet
Source§impl Default for PrincipalSet
impl Default for PrincipalSet
impl Eq for PrincipalSet
Source§impl PartialEq for PrincipalSet
impl PartialEq for PrincipalSet
impl StructuralPartialEq for PrincipalSet
Auto Trait Implementations§
impl Freeze for PrincipalSet
impl RefUnwindSafe for PrincipalSet
impl Send for PrincipalSet
impl Sync for PrincipalSet
impl Unpin for PrincipalSet
impl UnsafeUnpin for PrincipalSet
impl UnwindSafe for PrincipalSet
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