Enum cgroups_rs::devices::DevicePermissions
source · pub enum DevicePermissions {
Read,
Write,
MkNod,
}Expand description
An enum with the permissions that can be allowed/denied to the control group.
Variants§
Read
Permission to read from the device.
Write
Permission to write to the device.
MkNod
Permission to execute the mknod(2) system call with the device’s major and minor numbers.
That is, the permission to create a special file that refers to the device node.
Implementations§
source§impl DevicePermissions
impl DevicePermissions
sourcepub fn to_char(&self) -> char
pub fn to_char(&self) -> char
Convert a DevicePermissions into the character that the kernel recognizes.
sourcepub fn from_char(c: char) -> Option<DevicePermissions>
pub fn from_char(c: char) -> Option<DevicePermissions>
Convert a char to a DevicePermission if there is such a mapping.
sourcepub fn is_valid(s: &str) -> bool
pub fn is_valid(s: &str) -> bool
Checks whether the string is a valid descriptor of DevicePermissions.
sourcepub fn all() -> Vec<DevicePermissions> ⓘ
pub fn all() -> Vec<DevicePermissions> ⓘ
Returns a Vec will all the permissions that a device can have.
Trait Implementations§
source§impl Clone for DevicePermissions
impl Clone for DevicePermissions
source§fn clone(&self) -> DevicePermissions
fn clone(&self) -> DevicePermissions
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 DevicePermissions
impl Debug for DevicePermissions
source§impl PartialEq<DevicePermissions> for DevicePermissions
impl PartialEq<DevicePermissions> for DevicePermissions
source§fn eq(&self, other: &DevicePermissions) -> bool
fn eq(&self, other: &DevicePermissions) -> bool
This method tests for
self and other values to be equal, and is used
by ==.