pub struct ErrorReply<'msg> {
pub cni_version: Version,
pub code: i32,
pub msg: &'msg str,
pub details: String,
}Expand description
The reply structure used when returning an error.
Fields§
§cni_version: VersionThe CNI version of the plugin input config.
code: i32A 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 strA short message characterising the error.
This is generally a static non-interpolated string.
details: StringA longer message describing the error.
Trait Implementations§
Source§impl<'msg> Clone for ErrorReply<'msg>
impl<'msg> Clone for ErrorReply<'msg>
Source§fn clone(&self) -> ErrorReply<'msg>
fn clone(&self) -> ErrorReply<'msg>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'msg> Debug for ErrorReply<'msg>
impl<'msg> Debug for ErrorReply<'msg>
Source§impl<'de: 'msg, 'msg> Deserialize<'de> for ErrorReply<'msg>
impl<'de: 'msg, 'msg> Deserialize<'de> for ErrorReply<'msg>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<'de> ReplyPayload<'de> for ErrorReply<'de>
impl<'de> ReplyPayload<'de> for ErrorReply<'de>
Auto Trait Implementations§
impl<'msg> Freeze for ErrorReply<'msg>
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§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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