pub enum ResponseCode {
Show 24 variants
Success = 0,
Continuation = 1,
NeedsAuthentication = 65_536,
Forbidden = 65_537,
Closing = 65_538,
Errno = 65_539,
AuthenticationFailed = 65_540,
Gone = 65_541,
NotFound = 65_542,
InternalError = 65_543,
ChannelDead = 65_544,
Aborted = 65_545,
ContinuationNotFound = 65_546,
OutOfRange = 65_547,
NoSpace = 65_548,
Conflict = 65_549,
Unlistable = 65_550,
NotEnabled = 131_072,
NotSupported = 131_073,
ParametersNotSupported = 131_074,
Invalid = 131_075,
TooLarge = 131_076,
TooManyMessages = 131_077,
InvalidParameters = 131_078,
}Expand description
The response codes for the protocol.
The response codes are based around IMAP’s response codes, and the top two bytes of the response indicates the type:
- 00: success
- 01: no (roughly, the request was understood, but not completed)
- 02: bad (roughly, the request was not understood)
- ff: extension message (dynamically allocated)
Variants§
Success = 0
The request was successful. The response contains the requested data.
Continuation = 1
The request is incomplete, but is so far successful. The request should continue, referencing the ID of the last request.
NeedsAuthentication = 65_536
The request requires authentication.
The semantics for this message are equivalent to an HTTP 401 response.
Forbidden = 65_537
The message was not allowed.
The semantics for this message are equivalent to an HTTP 403 response.
Closing = 65_538
The server is shutting down.
Errno = 65_539
The message failed for a system error reason.
This is generally only useful for certain types of channels.
AuthenticationFailed = 65_540
Gone = 65_541
The other end of the channel has disappeared.
NotFound = 65_542
InternalError = 65_543
ChannelDead = 65_544
The channel has ceased to produce new data and this operation cannot complete.
Aborted = 65_545
The operation was aborted.
ContinuationNotFound = 65_546
There is no continuation with the specified parameters.
OutOfRange = 65_547
The result was out of range.
The semantics for this message are equivalent to ERANGE.
NoSpace = 65_548
There is no more space for the requested item.
Conflict = 65_549
The requested operation would conflict with something already existing.
The semantics for this message are equivalent to an HTTP 409 response.
Unlistable = 65_550
The contents of the object cannot be listed or specified by name.
For example, when using a Git-protocol credential helper, it is not possible to enumerate all credentials or pick a credential by ID.
NotEnabled = 131_072
The message type was not enabled.
NotSupported = 131_073
The message type or operation was not supported.
ParametersNotSupported = 131_074
The parameters were not supported.
Invalid = 131_075
The message type was received, but was not valid.
TooLarge = 131_076
The message was too large.
TooManyMessages = 131_077
There are too many pending messages.
InvalidParameters = 131_078
The parameters are supported, but not correct.
For example, if a selector is not valid for a channel, this message may be sent.
Trait Implementations§
Source§impl Clone for ResponseCode
impl Clone for ResponseCode
Source§fn clone(&self) -> ResponseCode
fn clone(&self) -> ResponseCode
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ResponseCode
Source§impl Debug for ResponseCode
impl Debug for ResponseCode
impl Eq for ResponseCode
Source§impl From<ResponseCode> for Error
impl From<ResponseCode> for Error
Source§fn from(code: ResponseCode) -> Error
fn from(code: ResponseCode) -> Error
Source§impl FromPrimitive for ResponseCode
impl FromPrimitive for ResponseCode
Source§fn from_i64(n: i64) -> Option<Self>
fn from_i64(n: i64) -> Option<Self>
i64 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_u64(n: u64) -> Option<Self>
fn from_u64(n: u64) -> Option<Self>
u64 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_isize(n: isize) -> Option<Self>
fn from_isize(n: isize) -> Option<Self>
isize to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_i8(n: i8) -> Option<Self>
fn from_i8(n: i8) -> Option<Self>
i8 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_i16(n: i16) -> Option<Self>
fn from_i16(n: i16) -> Option<Self>
i16 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_i32(n: i32) -> Option<Self>
fn from_i32(n: i32) -> Option<Self>
i32 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_i128(n: i128) -> Option<Self>
fn from_i128(n: i128) -> Option<Self>
i128 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned. Read moreSource§fn from_usize(n: usize) -> Option<Self>
fn from_usize(n: usize) -> Option<Self>
usize to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_u8(n: u8) -> Option<Self>
fn from_u8(n: u8) -> Option<Self>
u8 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_u16(n: u16) -> Option<Self>
fn from_u16(n: u16) -> Option<Self>
u16 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_u32(n: u32) -> Option<Self>
fn from_u32(n: u32) -> Option<Self>
u32 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_u128(n: u128) -> Option<Self>
fn from_u128(n: u128) -> Option<Self>
u128 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned. Read moreSource§impl Ord for ResponseCode
impl Ord for ResponseCode
Source§fn cmp(&self, other: &ResponseCode) -> Ordering
fn cmp(&self, other: &ResponseCode) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for ResponseCode
impl PartialEq for ResponseCode
Source§fn eq(&self, other: &ResponseCode) -> bool
fn eq(&self, other: &ResponseCode) -> bool
self and other values to be equal, and is used by ==.