Struct linux_keyutils::KeyPermissions
source · [−]pub struct KeyPermissions(_);
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
sourceimpl 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
sourceimpl Clone for KeyPermissions
impl Clone for KeyPermissions
sourcefn clone(&self) -> KeyPermissions
fn clone(&self) -> KeyPermissions
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for KeyPermissions
impl Debug for KeyPermissions
sourceimpl Default for KeyPermissions
impl Default for KeyPermissions
impl Copy for KeyPermissions
Auto Trait Implementations
impl RefUnwindSafe for KeyPermissions
impl Send for KeyPermissions
impl Sync for KeyPermissions
impl Unpin for KeyPermissions
impl UnwindSafe for KeyPermissions
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more