Struct linux_keyutils::KeyPermissionsBuilder
source · pub struct KeyPermissionsBuilder(_);
Expand description
Construct key permissions with the builder pattern.
Usage:
use linux_keyutils::{Permission, KeyPermissionsBuilder};
let perms = KeyPermissionsBuilder::builder()
.user(Permission::ALL)
.group(Permission::VIEW)
.build();
Implementations§
source§impl KeyPermissionsBuilder
impl KeyPermissionsBuilder
sourcepub fn posessor(self, perm: Permission) -> Self
pub fn posessor(self, perm: Permission) -> Self
Set the permissions available to the key’s possessor
sourcepub fn user(self, perm: Permission) -> Self
pub fn user(self, perm: Permission) -> Self
Set the permissions available to the key’s owning user (UID)
sourcepub fn group(self, perm: Permission) -> Self
pub fn group(self, perm: Permission) -> Self
Set the permissions available to the key’s owning group (GID)
sourcepub fn world(self, perm: Permission) -> Self
pub fn world(self, perm: Permission) -> Self
Set the permissions available to any 3rd party
sourcepub fn build(self) -> KeyPermissions
pub fn build(self) -> KeyPermissions
Finish the build and obtain the created KeyPermissions
Trait Implementations§
source§impl Clone for KeyPermissionsBuilder
impl Clone for KeyPermissionsBuilder
source§fn clone(&self) -> KeyPermissionsBuilder
fn clone(&self) -> KeyPermissionsBuilder
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 more