Inputs

Struct Inputs 

Source
pub struct Inputs {
    pub command: Command,
    pub container_id: String,
    pub ifname: String,
    pub netns: Option<PathBuf>,
    pub path: Vec<PathBuf>,
    pub config: NetworkConfig,
}
Expand description

An alternate representation of plugin inputs.

This can be obtained from Cni with the Cni::into_inputs() method.

Fields§

§command: Command

The command given to the plugin.

§container_id: String

The container ID, as provided by the runtime.

The spec says:

A unique plaintext identifier for a container, allocated by the runtime. Not empty.

In practice, this may not be the ID of an actual container, but rather the ID of the logical container grouping this network applies to. E.g. a Pod, Alloc, etc.

§ifname: String

The name of the interface to create, delete, check, or manage inside the container.

§netns: Option<PathBuf>

The container’s “isolation domain.”

If using network namespaces, then a path to the network namespace.

Optional for DEL.

§path: Vec<PathBuf>

List of paths to search for CNI plugin executables.

This is in the same format as the host system’s PATH variable: e.g. separated by : on unix, and by ; on Windows.

§config: NetworkConfig

The input network configuration.

Trait Implementations§

Source§

impl Clone for Inputs

Source§

fn clone(&self) -> Inputs

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Inputs

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Inputs

§

impl RefUnwindSafe for Inputs

§

impl Send for Inputs

§

impl Sync for Inputs

§

impl Unpin for Inputs

§

impl UnwindSafe for Inputs

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.