#[repr(u32)]pub enum ProtocolError {
CommandNotPermitted = 1,
IO = 5,
OutOfMemory = 12,
InvalidArgument = 22,
NoSpaceLeft = 28,
ValueTooLarge = 75,
CommandNotSupported = 95,
ServerShuttingDown = 108,
}Expand description
Errors that can occur during the normal NBD transmission loop.
These errors correspond to the standard NBD error codes defined in the protocol specification. Each error maps to a specific numeric value that is sent over the wire to the client.
The error codes follow POSIX errno values where possible, as per the NBD protocol specification.
Variants§
CommandNotPermitted = 1
The client is not permitted to perform the requested operation.
Corresponds to POSIX EPERM (1) and NBD_EPERM.
IO = 5
An input/output error occurred during the operation.
Corresponds to POSIX EIO (5) and NBD_EIO.
OutOfMemory = 12
The server cannot allocate sufficient memory to complete the operation.
Corresponds to POSIX ENOMEM (12) and NBD_ENOMEM.
InvalidArgument = 22
The client provided an invalid argument or request structure.
Corresponds to POSIX EINVAL (22) and NBD_EINVAL.
NoSpaceLeft = 28
There is no space left on the storage device to complete the operation.
Corresponds to POSIX ENOSPC (28) and NBD_ENOSPC.
ValueTooLarge = 75
The requested operation would cause a value to overflow.
Corresponds to POSIX EOVERFLOW (75) and NBD_EOVERFLOW.
CommandNotSupported = 95
The requested command is not supported by the server implementation.
Corresponds to POSIX ENOTSUP (95) and NBD_ENOTSUP.
ServerShuttingDown = 108
The server is in the process of shutting down and cannot process the request.
Corresponds to POSIX ESHUTDOWN (108) and NBD_ESHUTDOWN.
Trait Implementations§
Source§impl Debug for ProtocolError
impl Debug for ProtocolError
Source§impl Display for ProtocolError
impl Display for ProtocolError
impl Eq for ProtocolError
Source§impl Error for ProtocolError
impl Error for ProtocolError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<ProtocolError> for u32
impl From<ProtocolError> for u32
Source§fn from(v: ProtocolError) -> Self
fn from(v: ProtocolError) -> Self
Source§impl PartialEq for ProtocolError
impl PartialEq for ProtocolError
Source§fn eq(&self, other: &ProtocolError) -> bool
fn eq(&self, other: &ProtocolError) -> bool
self and other values to be equal, and is used by ==.