pub struct Permissions { /* private fields */ }Implementations§
Source§impl Permissions
impl Permissions
pub fn new() -> Self
pub fn new_allow_all() -> Self
pub fn add_to_envelope(&self, envelope: Envelope) -> Envelope
pub fn try_from_envelope(envelope: &Envelope) -> Result<Self>
Trait Implementations§
Source§impl Clone for Permissions
impl Clone for Permissions
Source§fn clone(&self) -> Permissions
fn clone(&self) -> Permissions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Permissions
impl Debug for Permissions
Source§impl Default for Permissions
impl Default for Permissions
Source§impl HasPermissions for Permissions
impl HasPermissions for Permissions
fn permissions(&self) -> &Permissions
fn permissions_mut(&mut self) -> &mut Permissions
fn allow(&self) -> &HashSet<Privilege>
fn deny(&self) -> &HashSet<Privilege>
fn allow_mut(&mut self) -> &mut HashSet<Privilege>
fn deny_mut(&mut self) -> &mut HashSet<Privilege>
fn add_allow(&mut self, privilege: Privilege)
fn add_deny(&mut self, privilege: Privilege)
fn remove_allow(&mut self, privilege: &Privilege)
fn remove_deny(&mut self, privilege: &Privilege)
fn clear_all_permissions(&mut self)
Source§impl PartialEq for Permissions
impl PartialEq for Permissions
impl Eq for Permissions
impl StructuralPartialEq for Permissions
Auto Trait Implementations§
impl Freeze for Permissions
impl RefUnwindSafe for Permissions
impl Send for Permissions
impl Sync for Permissions
impl Unpin for Permissions
impl UnwindSafe for Permissions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more