#[repr(i32)]pub enum ErrorCode {
Unspecified = 0,
Failed = 1,
NotFound = 2,
Timeout = 3,
PermissionDenied = 4,
VersionIncompatible = 5,
InvalidArgument = 6,
Cancelled = 7,
}Expand description
The reason for a failed request.
The values 1 to 5 are equal to the values of ErrorCode in the nomux
control protocol (package nomux.wire.v1).
Variants§
Unspecified = 0
The sender did not set the field. The receiver treats this as
ERROR_CODE_FAILED. The receiver does the same for a value that it does
not know.
Failed = 1
The request failed, and no other code gives the reason.
NotFound = 2
The method or the item that the request names does not exist.
Timeout = 3
The receiver did not complete the request in the permitted time.
PermissionDenied = 4
The extension does not have the permission that the request needs.
VersionIncompatible = 5
The host does not supply the extension API version that the extension
needs. Only the reply to Hello uses this code.
InvalidArgument = 6
The receiver cannot read the payload of the request.
Cancelled = 7
The receiver stopped the request because the sender sent Cancel.
Implementations§
Source§impl ErrorCode
impl ErrorCode
Sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
Sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.