#[non_exhaustive]pub enum EncoderError {
SerializationFailed(Error),
TimestampBeforeEpoch(SystemTimeError),
NotSupported(String),
Other(String),
}Expand description
Errors during event encoding (serialization, timestamp conversion, protobuf).
Preserves original error sources where possible so callers can inspect the underlying failure without string parsing.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
SerializationFailed(Error)
JSON serialization failed.
Preserves the original serde_json::Error so callers can inspect
whether the failure was due to I/O, data, syntax, or EOF conditions.
TimestampBeforeEpoch(SystemTimeError)
The event timestamp predates the Unix epoch.
Preserves the original std::time::SystemTimeError so callers can
inspect how far before the epoch the timestamp was.
NotSupported(String)
The encoder does not support this event type (e.g., a metric-only encoder receiving a log event).
Other(String)
A catch-all for encoder errors that do not fit other variants.
Used for feature-gated encoders (protobuf, snappy) where preserving the concrete error type would require conditional compilation on the enum definition itself.
Trait Implementations§
Source§impl Debug for EncoderError
impl Debug for EncoderError
Source§impl Display for EncoderError
impl Display for EncoderError
Source§impl Error for EncoderError
impl Error for EncoderError
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()