#[repr(i32)]pub enum ErrorCode {
ErrUnknown = 0,
ErrProtocolMismatch = 1,
ErrNotRegistered = 2,
ErrRateLimited = 3,
ErrInternal = 4,
ErrDeserialization = 5,
ErrMacMissing = 6,
ErrMacInvalid = 7,
ErrPermissionDenied = 8,
}Variants§
ErrUnknown = 0
ErrProtocolMismatch = 1
protocol version mismatch
ErrNotRegistered = 2
plugin hasn’t registered yet
ErrRateLimited = 3
too many requests
ErrInternal = 4
internal kernel error
ErrDeserialization = 5
failed to parse the message
ErrMacMissing = 6
registered conn sent an un-MAC’d frame while secured
ErrMacInvalid = 7
frame MAC verification failed (tampering)
ErrPermissionDenied = 8
plugin lacks required permission for this operation
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.
Trait Implementations§
impl Copy for ErrorCode
impl Eq for ErrorCode
Source§impl Ord for ErrorCode
impl Ord for ErrorCode
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for ErrorCode
impl PartialOrd for ErrorCode
impl StructuralPartialEq for ErrorCode
Auto Trait Implementations§
impl Freeze for ErrorCode
impl RefUnwindSafe for ErrorCode
impl Send for ErrorCode
impl Sync for ErrorCode
impl Unpin for ErrorCode
impl UnsafeUnpin for ErrorCode
impl UnwindSafe for ErrorCode
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