Enum caps::Capability[][src]

#[repr(u8)]
pub enum Capability {
Show variants CAP_CHOWN, CAP_DAC_OVERRIDE, CAP_DAC_READ_SEARCH, CAP_FOWNER, CAP_FSETID, CAP_KILL, CAP_SETGID, CAP_SETUID, CAP_SETPCAP, CAP_LINUX_IMMUTABLE, CAP_NET_BIND_SERVICE, CAP_NET_BROADCAST, CAP_NET_ADMIN, CAP_NET_RAW, CAP_IPC_LOCK, CAP_IPC_OWNER, CAP_SYS_MODULE, CAP_SYS_RAWIO, CAP_SYS_CHROOT, CAP_SYS_PTRACE, CAP_SYS_PACCT, CAP_SYS_ADMIN, CAP_SYS_BOOT, CAP_SYS_NICE, CAP_SYS_RESOURCE, CAP_SYS_TIME, CAP_SYS_TTY_CONFIG, CAP_MKNOD, CAP_LEASE, CAP_AUDIT_WRITE, CAP_AUDIT_CONTROL, CAP_SETFCAP, CAP_MAC_OVERRIDE, CAP_MAC_ADMIN, CAP_SYSLOG, CAP_WAKE_ALARM, CAP_BLOCK_SUSPEND, CAP_AUDIT_READ, CAP_PERFMON, CAP_BPF, CAP_CHECKPOINT_RESTORE, // some variants omitted
}

Linux capabilities.

All capabilities supported by Linux, including standard POSIX and custom ones. See capabilities(7).

Variants

CAP_CHOWN

CAP_CHOWN (from POSIX)

CAP_DAC_OVERRIDE

CAP_DAC_OVERRIDE (from POSIX)

CAP_DAC_READ_SEARCH (from POSIX)

CAP_FOWNER

CAP_FOWNER (from POSIX)

CAP_FSETID

CAP_FSETID (from POSIX)

CAP_KILL

CAP_KILL (from POSIX)

CAP_SETGID

CAP_SETGID (from POSIX)

CAP_SETUID

CAP_SETUID (from POSIX)

CAP_SETPCAP

CAP_SETPCAP (from Linux)

CAP_LINUX_IMMUTABLE
CAP_NET_BIND_SERVICE
CAP_NET_BROADCAST
CAP_NET_ADMIN
CAP_NET_RAW
CAP_IPC_LOCK
CAP_IPC_OWNER
CAP_SYS_MODULE

CAP_SYS_MODULE (from Linux)

CAP_SYS_RAWIO

CAP_SYS_RAWIO (from Linux)

CAP_SYS_CHROOT

CAP_SYS_CHROOT (from Linux)

CAP_SYS_PTRACE

CAP_SYS_PTRACE (from Linux)

CAP_SYS_PACCT

CAP_SYS_PACCT (from Linux)

CAP_SYS_ADMIN

CAP_SYS_ADMIN (from Linux)

CAP_SYS_BOOT

CAP_SYS_BOOT (from Linux)

CAP_SYS_NICE

CAP_SYS_NICE (from Linux)

CAP_SYS_RESOURCE

CAP_SYS_RESOURCE (from Linux)

CAP_SYS_TIME

CAP_SYS_TIME (from Linux)

CAP_SYS_TTY_CONFIG

CAP_SYS_TTY_CONFIG (from Linux)

CAP_MKNOD

CAP_SYS_MKNOD (from Linux, >= 2.4)

CAP_LEASE

CAP_LEASE (from Linux, >= 2.4)

CAP_AUDIT_WRITE
CAP_AUDIT_CONTROL

CAP_AUDIT_CONTROL (from Linux, >= 2.6.11)

CAP_SETFCAP
CAP_MAC_OVERRIDE
CAP_MAC_ADMIN
CAP_SYSLOG

CAP_SYSLOG (from Linux, >= 2.6.37)

CAP_WAKE_ALARM

CAP_WAKE_ALARM (from Linux, >= 3.0)

CAP_BLOCK_SUSPEND
CAP_AUDIT_READ

CAP_AUDIT_READ (from Linux, >= 3.16).

CAP_PERFMON

CAP_PERFMON (from Linux, >= 5.8).

CAP_BPF

CAP_BPF (from Linux, >= 5.8).

CAP_CHECKPOINT_RESTORE

CAP_CHECKPOINT_RESTORE (from Linux, >= 5.9).

Implementations

impl Capability[src]

pub fn bitmask(&self) -> u64[src]

Returns the bitmask corresponding to this capability value.

pub fn index(&self) -> u8[src]

Returns the index of this capability, i.e. its kernel-defined value.

Trait Implementations

impl Clone for Capability[src]

fn clone(&self) -> Capability[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for Capability[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl Display for Capability[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl FromStr for Capability[src]

type Err = CapsError

The associated error which can be returned from parsing.

fn from_str(s: &str) -> Result<Self, Self::Err>[src]

Parses a string s to return a value of this type. Read more

impl Hash for Capability[src]

fn hash<__H: Hasher>(&self, state: &mut __H)[src]

Feeds this value into the given Hasher. Read more

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given Hasher. Read more

impl PartialEq<Capability> for Capability[src]

fn eq(&self, other: &Capability) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl Copy for Capability[src]

impl Eq for Capability[src]

impl StructuralEq for Capability[src]

impl StructuralPartialEq for Capability[src]

Auto Trait Implementations

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

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

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

impl<T> ToString for T where
    T: Display + ?Sized
[src]

pub default fn to_string(&self) -> String[src]

Converts the given value to a String. Read more

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.