[][src]Struct capctl::caps::FullCapState

#[non_exhaustive]pub struct FullCapState {
    pub permitted: CapSet,
    pub effective: CapSet,
    pub inheritable: CapSet,
    pub ambient: CapSet,
    pub bounding: CapSet,
    pub no_new_privs: bool,
}

Represents the "full" capability state of a thread (i.e. the contents of all 5 capability sets and some additional information).

Fields (Non-exhaustive)

Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
permitted: CapSeteffective: CapSetinheritable: CapSetambient: CapSetbounding: CapSetno_new_privs: bool

Implementations

impl FullCapState[src]

pub fn empty() -> Self[src]

Construct an empty FullCapState object.

pub fn get_current() -> Result<Self>[src]

Get the full capability state of the current thread.

This is equivalent to FullCapState::get_for_pid(0). However, this method uses the kernel APIs to retrieve information instead of examining files in /proc.

pub fn get_for_pid(pid: pid_t) -> Result<Self>[src]

Get the full capability state of the process (or thread) with the given PID (or TID) by examining special files in /proc.

If pid is 0, this method gets the capability state of the current thread.

Trait Implementations

impl Clone for FullCapState[src]

impl Copy for FullCapState[src]

impl Debug for FullCapState[src]

impl Eq for FullCapState[src]

impl Hash for FullCapState[src]

impl PartialEq<FullCapState> for FullCapState[src]

impl StructuralEq for FullCapState[src]

impl StructuralPartialEq for FullCapState[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.