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 duplicate 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 for DevicePermissions
impl PartialEq for DevicePermissions
impl Copy for DevicePermissions
impl Eq for DevicePermissions
impl StructuralPartialEq for DevicePermissions
Auto Trait Implementations§
impl Freeze for DevicePermissions
impl RefUnwindSafe for DevicePermissions
impl Send for DevicePermissions
impl Sync for DevicePermissions
impl Unpin for DevicePermissions
impl UnwindSafe for DevicePermissions
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