#[non_exhaustive]pub enum NetError {
AuthenticationError,
ConfigurationError(String),
SerializeError(String),
IoError(Error),
DeserializeError {
err: String,
req: Box<[u8]>,
res: Box<[u8]>,
},
ServerError(String),
InternalError(String),
ItemNotFound(String),
UnexpectedData(String),
Unknown(String),
}Expand description
There was a problem sending/receiving a KMIP request/response.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
AuthenticationError
ConfigurationError(String)
SerializeError(String)
IoError(Error)
DeserializeError
Fields
ServerError(String)
InternalError(String)
ItemNotFound(String)
UnexpectedData(String)
Unknown(String)
Implementations§
Source§impl NetError
impl NetError
pub fn deserialize_error(err: String) -> Self
Sourcepub fn is_connection_error(&self) -> bool
pub fn is_connection_error(&self) -> bool
Is this a possibly transient problem with the connection to the server?
Trait Implementations§
Source§impl Display for NetError
Format the error for user-facing output.
impl Display for NetError
Format the error for user-facing output.
Tip: examples/hex_to_txt.rs can be used to render KMIP TTLV protocol wire request/response bytes into a form that can be more easily understood.
Source§impl Error for NetError
impl Error for NetError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl<T> From<PoisonError<T>> for NetError
impl<T> From<PoisonError<T>> for NetError
Source§fn from(err: PoisonError<T>) -> Self
fn from(err: PoisonError<T>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for NetError
impl !UnwindSafe for NetError
impl Forget for NetError
impl Freeze for NetError
impl Send for NetError
impl Sync for NetError
impl Unpin for NetError
impl UnsafeUnpin for NetError
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