pub struct KeyPermissions(/* private fields */);
Expand description
Construct key permissions for use with Key::set_perms or returned by Metadata::get_perms.
Usage:
use linux_keyutils::{Permission, KeyPermissions};
let mut perms = KeyPermissions::new();
perms.set_user_perms(Permission::ALL);
perms.set_group_perms(Permission::VIEW);
Implementations§
Source§impl KeyPermissions
impl KeyPermissions
Sourcepub fn set_posessor_perms(&mut self, perm: Permission)
pub fn set_posessor_perms(&mut self, perm: Permission)
Set the permissions available to the key’s possessor
Sourcepub fn set_user_perms(&mut self, perm: Permission)
pub fn set_user_perms(&mut self, perm: Permission)
Set the permissions available to the key’s owning user (UID)
Sourcepub fn set_group_perms(&mut self, perm: Permission)
pub fn set_group_perms(&mut self, perm: Permission)
Set the permissions available to the key’s owning group (GID)
Sourcepub fn set_world_perms(&mut self, perm: Permission)
pub fn set_world_perms(&mut self, perm: Permission)
Set the permissions available to any 3rd party
Trait Implementations§
Source§impl Clone for KeyPermissions
impl Clone for KeyPermissions
Source§fn clone(&self) -> KeyPermissions
fn clone(&self) -> KeyPermissions
Returns a copy 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 KeyPermissions
impl Debug for KeyPermissions
Source§impl Default for KeyPermissions
impl Default for KeyPermissions
impl Copy for KeyPermissions
Auto Trait Implementations§
impl Freeze for KeyPermissions
impl RefUnwindSafe for KeyPermissions
impl Send for KeyPermissions
impl Sync for KeyPermissions
impl Unpin for KeyPermissions
impl UnwindSafe for KeyPermissions
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