#[repr(i32)]pub enum TelemetryErrorCode {
Show 17 variants
GenericError = -2,
InvalidType = -3,
SizeMismatch = -4,
SizeMismatchError = -5,
EmptyEndpoints = -6,
TimestampInvalid = -7,
MissingPayload = -8,
HandlerError = -9,
BadArg = -10,
PermissionDenied = -11,
Pack = -12,
Unpack = -13,
Io = -14,
InvalidUtf8 = -15,
TypeMismatch = -16,
InvalidLinkId = -17,
PacketTooLarge = -18,
}Expand description
Numeric error codes used on the C/Python FFI boundary.
Negative values are used to avoid collisions with success codes and other positive return values (e.g. lengths).
Variants§
GenericError = -2
InvalidType = -3
SizeMismatch = -4
SizeMismatchError = -5
EmptyEndpoints = -6
TimestampInvalid = -7
MissingPayload = -8
HandlerError = -9
BadArg = -10
PermissionDenied = -11
Pack = -12
Unpack = -13
Io = -14
InvalidUtf8 = -15
TypeMismatch = -16
InvalidLinkId = -17
PacketTooLarge = -18
Implementations§
Source§impl TelemetryErrorCode
impl TelemetryErrorCode
Sourcepub fn as_str(&self) -> &'static str
pub fn as_str(&self) -> &'static str
Human-readable string for logging / debugging.
§Returns
- Static string representation of the error code.
Sourcepub fn try_from_i32(x: i32) -> Option<Self>
pub fn try_from_i32(x: i32) -> Option<Self>
Try to convert a raw i32 error code into a TelemetryErrorCode.
Returns None if the code is out of range or not recognized.
§Arguments
x: Raw i32 error code to convert.
§Returns
Some(TelemetryErrorCode)if valid,Noneif invalid.
Trait Implementations§
Source§impl Clone for TelemetryErrorCode
impl Clone for TelemetryErrorCode
Source§fn clone(&self) -> TelemetryErrorCode
fn clone(&self) -> TelemetryErrorCode
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for TelemetryErrorCode
Source§impl Debug for TelemetryErrorCode
impl Debug for TelemetryErrorCode
impl Eq for TelemetryErrorCode
Source§impl PartialEq for TelemetryErrorCode
impl PartialEq for TelemetryErrorCode
Source§fn eq(&self, other: &TelemetryErrorCode) -> bool
fn eq(&self, other: &TelemetryErrorCode) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for TelemetryErrorCode
Auto Trait Implementations§
impl Freeze for TelemetryErrorCode
impl RefUnwindSafe for TelemetryErrorCode
impl Send for TelemetryErrorCode
impl Sync for TelemetryErrorCode
impl Unpin for TelemetryErrorCode
impl UnsafeUnpin for TelemetryErrorCode
impl UnwindSafe for TelemetryErrorCode
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