Enum cgroups::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
sourceimpl 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
sourceimpl Clone for DevicePermissions
impl Clone for DevicePermissions
sourcefn clone(&self) -> DevicePermissions
fn clone(&self) -> DevicePermissions
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 DevicePermissions
impl Debug for DevicePermissions
sourceimpl PartialEq<DevicePermissions> for DevicePermissions
impl PartialEq<DevicePermissions> for DevicePermissions
sourcefn eq(&self, other: &DevicePermissions) -> bool
fn eq(&self, other: &DevicePermissions) -> bool
impl Copy for DevicePermissions
impl Eq for DevicePermissions
impl StructuralEq for DevicePermissions
impl StructuralPartialEq for DevicePermissions
Auto Trait Implementations
impl RefUnwindSafe for DevicePermissions
impl Send for DevicePermissions
impl Sync for DevicePermissions
impl Unpin for DevicePermissions
impl UnwindSafe for DevicePermissions
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