[][src]Enum rctl::Action

pub enum Action {
    Deny,
    Log,
    DevCtl,
    Signal(Signal),
    Throttle,
}

Represents the action to be taken when a [Subject] offends against a Rule.

Variants

Deny the resource allocation

Not supported for the following Resources: CpuTime, Wallclock, ReadBps, WriteBps, ReadIops, WriteIops

Log a warning to the console

Send a notification to devd(8) using system = "RCTL", subsystem = "rule", type = "matched"

Send a signal to the offending process.

Example

use rctl::Signal;
use rctl::Action;

let action = Action::Signal(Signal::SIGTERM);

Slow down process execution

Only supported for the following Resources: ReadBps, WriteBps, ReadIops, WriteIops

Methods

impl Action
[src]

Return the string representation of the Action according to rctl(8)

Examples

use rctl::Action;
assert_eq!(Action::Deny.as_str(), "deny");

Signals are handled by rctl::Signal:

use rctl::Signal;
assert_eq!(Action::Signal(Signal::SIGKILL).as_str(), "sigkill");

Trait Implementations

impl Eq for Action
[src]

impl<'a> Into<&'static str> for &'a Action
[src]

Performs the conversion.

impl<'a> Into<String> for &'a Action
[src]

Performs the conversion.

impl PartialEq<Action> for Action
[src]

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

This method tests for !=.

impl Copy for Action
[src]

impl<'a> From<&'a Action> for Filter
[src]

Performs the conversion.

impl From<Action> for Filter
[src]

Performs the conversion.

impl Clone for Action
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Hash for Action
[src]

Feeds this value into the given [Hasher]. Read more

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

impl Display for Action
[src]

Formats the value using the given formatter. Read more

impl Debug for Action
[src]

Formats the value using the given formatter. Read more

impl FromStr for Action
[src]

The associated error which can be returned from parsing.

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

Auto Trait Implementations

impl Send for Action

impl Sync for Action

Blanket Implementations

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

Performs the conversion.

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

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

🔬 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]

Converts the given value to a String. Read more

impl<T> From for T
[src]

Performs the conversion.

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

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

The type returned in the event of a conversion error.

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

Performs the conversion.

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

Immutably borrows from an owned value. Read more

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

Mutably borrows from an owned value. Read more

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

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

The type returned in the event of a conversion error.

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

Performs the conversion.

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

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

this method will likely be replaced by an associated static

Gets the TypeId of self. Read more