[][src]Enum cgroups_rs::devices::DevicePermissions

pub enum DevicePermissions {
    Read,
    Write,
    MkNod,
}

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

impl DevicePermissions[src]

pub fn to_char(&self) -> char[src]

Convert a DevicePermissions into the character that the kernel recognizes.

pub fn from_char(c: char) -> Option<DevicePermissions>[src]

Convert a char to a DevicePermission if there is such a mapping.

pub fn is_valid(s: &str) -> bool[src]

Checks whether the string is a valid descriptor of DevicePermissions.

pub fn all() -> Vec<DevicePermissions>[src]

Returns a Vec will all the permissions that a device can have.

pub fn from_str(s: &str) -> Result<Vec<DevicePermissions>>[src]

Convert a string into DevicePermissions.

Trait Implementations

impl Clone for DevicePermissions[src]

impl Copy for DevicePermissions[src]

impl Debug for DevicePermissions[src]

impl Eq for DevicePermissions[src]

impl PartialEq<DevicePermissions> for DevicePermissions[src]

impl StructuralEq for DevicePermissions[src]

impl StructuralPartialEq for DevicePermissions[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.