pub enum TelemetryError {
Show 17 variants
GenericError(Option<Arc<str>>),
InvalidType,
SizeMismatch {
expected: usize,
got: usize,
},
SizeMismatchError,
EmptyEndpoints,
TimestampInvalid,
MissingPayload,
HandlerError(&'static str),
BadArg,
PermissionDenied,
Pack(&'static str),
Unpack(&'static str),
Io(&'static str),
InvalidUtf8,
TypeMismatch {
expected: usize,
got: usize,
},
InvalidLinkId(&'static str),
PacketTooLarge(&'static str),
}Expand description
Rich error type used throughout the telemetry crate.
Most public APIs expose a TelemetryResult<T> alias for
Result<T, TelemetryError>.
Variants§
GenericError(Option<Arc<str>>)
Generic / unspecified error.
InvalidType
Logical type ID is not a valid DataType.
SizeMismatch
Payload size doesn’t match the schema’s expectations.
SizeMismatchError
Legacy / generic size mismatch error (for C/Python parity).
EmptyEndpoints
No endpoints were supplied where they are required.
TimestampInvalid
Timestamp is invalid (e.g., zero when disallowed).
MissingPayload
A packet is missing its payload bytes.
HandlerError(&'static str)
A handler (C/Python callback) returned an error.
BadArg
Generic invalid argument from caller.
PermissionDenied
Operation is not permitted for the current router/device policy.
Pack(&'static str)
Packing error.
Unpack(&'static str)
Unpacking error.
Io(&'static str)
IO / transport error.
InvalidUtf8
UTF-8 decoding failed where string payloads are expected.
TypeMismatch
Payload type size mismatch.
InvalidLinkId(&'static str)
Invalid link ID provided.
PacketTooLarge(&'static str)
Packet is bigger than the queue size
Implementations§
Source§impl TelemetryError
impl TelemetryError
Sourcepub const fn to_error_code(&self) -> TelemetryErrorCode
pub const fn to_error_code(&self) -> TelemetryErrorCode
Map a rich TelemetryError to a stable numeric error code
used by the FFI layers.
Trait Implementations§
Source§impl Clone for TelemetryError
impl Clone for TelemetryError
Source§impl Debug for TelemetryError
impl Debug for TelemetryError
Source§impl Display for TelemetryError
Allow conversion of TelemetryError to human-readable string.
impl Display for TelemetryError
Allow conversion of TelemetryError to human-readable string.
impl Eq for TelemetryError
Source§impl Error for TelemetryError
Available on crate feature std only.Implement std::error::Error for TelemetryError when std is enabled.
impl Error for TelemetryError
std only.Implement std::error::Error for TelemetryError when std is enabled.
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<Box<dyn Error>> for TelemetryError
Available on crate feature std only.Allow the conversion from boxed std error to telemetry error
impl From<Box<dyn Error>> for TelemetryError
std only.Allow the conversion from boxed std error to telemetry error
Source§impl From<Error> for TelemetryError
Available on crate feature std only.Allow the conversion from std error to telemetry error
impl From<Error> for TelemetryError
std only.Allow the conversion from std error to telemetry error