Struct cni_plugin::reply::ErrorReply[][src]

pub struct ErrorReply<'msg> {
    pub cni_version: Version,
    pub code: i32,
    pub msg: &'msg str,
    pub details: String,
}

The reply structure used when returning an error.

Fields

cni_version: Version

The CNI version of the plugin input config.

code: i32

A code for the error.

Must match the exit code.

Codes 1-99 are reserved by the spec, codes 100+ may be used for plugins’ own error codes. Code 0 is not to be used, as it is for successful exit.

msg: &'msg str

A short message characterising the error.

This is generally a static non-interpolated string.

details: String

A longer message describing the error.

Trait Implementations

impl<'msg> Clone for ErrorReply<'msg>[src]

impl<'msg> Debug for ErrorReply<'msg>[src]

impl<'de: 'msg, 'msg> Deserialize<'de> for ErrorReply<'msg>[src]

impl<'de> ReplyPayload<'de> for ErrorReply<'de>[src]

fn code(&self) -> i32[src]

Sets the exit status of the process to the code of the error reply.

impl<'msg> Serialize for ErrorReply<'msg>[src]

Auto Trait Implementations

impl<'msg> RefUnwindSafe for ErrorReply<'msg>

impl<'msg> Send for ErrorReply<'msg>

impl<'msg> Sync for ErrorReply<'msg>

impl<'msg> Unpin for ErrorReply<'msg>

impl<'msg> UnwindSafe for ErrorReply<'msg>

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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[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.