#[repr(u16)]pub enum GeneralCode {
Show 18 variants
Success = 0,
Failure = 1,
BadPrecondition = 2,
OutOfRange = 3,
BadRequest = 4,
Unsupported = 5,
Unexpected = 6,
ResourceExhausted = 7,
Busy = 8,
Timeout = 9,
Continue = 10,
Aborted = 11,
InvalidArgument = 12,
NotFound = 13,
AlreadyExists = 14,
PermissionDenied = 15,
DataLoss = 16,
MessageTooLarge = 17,
}Expand description
The uniform status codes of Appendix D.3.1.
Exhaustive on purpose: the specification closes this set, so a match on it should
be checked for completeness when a future revision adds one.
Variants§
Success = 0
Operation completed successfully.
Failure = 1
Generic failure; the protocol-specific code says more.
BadPrecondition = 2
“Operation was rejected by the system because the system is in an invalid state.”
OutOfRange = 3
A value was out of a required range.
BadRequest = 4
A request was unrecognized or malformed.
Unsupported = 5
An unrecognized or unsupported request was received.
Unexpected = 6
A request was not expected at this time.
ResourceExhausted = 7
Insufficient resources to process the given request.
Busy = 8
Device is busy and cannot handle this request at this time.
Timeout = 9
A timeout occurred.
Continue = 10
Context-specific signal to proceed.
Aborted = 11
Failure, may be due to a concurrency error.
InvalidArgument = 12
An invalid or unsupported argument was provided.
NotFound = 13
Some requested entity was not found.
AlreadyExists = 14
The sender attempted to create something that already exists.
PermissionDenied = 15
The sender does not have sufficient permissions.
DataLoss = 16
Unrecoverable data loss or corruption has occurred.
MessageTooLarge = 17
“Message size is larger than the recipient can handle” — what a node answers when a peer announces a message above its Maximum Message Size (§4.15.2.3).