[][src]Enum capctl::caps::Cap

#[repr(u8)]
#[non_exhaustive]pub enum Cap {
    CHOWN,
    DAC_OVERRIDE,
    DAC_READ_SEARCH,
    FOWNER,
    FSETID,
    KILL,
    SETGID,
    SETUID,
    SETPCAP,
    LINUX_IMMUTABLE,
    NET_BIND_SERVICE,
    NET_BROADCAST,
    NET_ADMIN,
    NET_RAW,
    IPC_LOCK,
    IPC_OWNER,
    SYS_MODULE,
    SYS_RAWIO,
    SYS_CHROOT,
    SYS_PTRACE,
    SYS_PACCT,
    SYS_ADMIN,
    SYS_BOOT,
    SYS_NICE,
    SYS_RESOURCE,
    SYS_TIME,
    SYS_TTY_CONFIG,
    MKNOD,
    LEASE,
    AUDIT_WRITE,
    AUDIT_CONTROL,
    SETFCAP,
    MAC_OVERRIDE,
    MAC_ADMIN,
    SYSLOG,
    WAKE_ALARM,
    BLOCK_SUSPEND,
    AUDIT_READ,
    PERFMON,
    BPF,
    CHECKPOINT_RESTORE,
}

An enum representing all of the possible Linux capabilities.

Variants (Non-exhaustive)

Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
CHOWN
DAC_OVERRIDE
FOWNER
FSETID
KILL
SETGID
SETUID
SETPCAP
LINUX_IMMUTABLE
NET_BIND_SERVICE
NET_BROADCAST
NET_ADMIN
NET_RAW
IPC_LOCK
IPC_OWNER
SYS_MODULE
SYS_RAWIO
SYS_CHROOT
SYS_PTRACE
SYS_PACCT
SYS_ADMIN
SYS_BOOT
SYS_NICE
SYS_RESOURCE
SYS_TIME
SYS_TTY_CONFIG
MKNOD
LEASE
AUDIT_WRITE
AUDIT_CONTROL
SETFCAP
MAC_OVERRIDE
MAC_ADMIN
SYSLOG
WAKE_ALARM
BLOCK_SUSPEND
AUDIT_READ
PERFMON
BPF
CHECKPOINT_RESTORE

Implementations

impl Cap[src]

pub fn iter() -> CapIter

Notable traits for CapIter

impl Iterator for CapIter type Item = Cap;
[src]

Return an iterator over all of the capabilities enumerated by Cap.

pub fn is_supported(self) -> bool[src]

Checks whether the specified capability is supported on the current kernel.

pub fn probe_supported() -> CapSet[src]

Determines the set of capabilities supported by the running kernel.

This uses a binary search combined with Cap::is_supported() to determine the supported capabilities. It is more efficient than a simple Cap::iter()/Cap::is_supported() loop.

Trait Implementations

impl Clone for Cap[src]

impl Copy for Cap[src]

impl Debug for Cap[src]

impl Display for Cap[src]

impl Eq for Cap[src]

impl Extend<Cap> for CapSet[src]

impl FromIterator<Cap> for CapSet[src]

impl FromStr for Cap[src]

type Err = ParseCapError

The associated error which can be returned from parsing.

impl Hash for Cap[src]

impl PartialEq<Cap> for Cap[src]

impl StructuralEq for Cap[src]

impl StructuralPartialEq for Cap[src]

Auto Trait Implementations

impl RefUnwindSafe for Cap

impl Send for Cap

impl Sync for Cap

impl Unpin for Cap

impl UnwindSafe for Cap

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> ToString for T where
    T: Display + ?Sized
[src]

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.