pub enum EventError {
ParseFailed {
line_num: usize,
reason: String,
},
UnknownType {
event_type: String,
},
InvalidTimestamp {
raw: String,
},
ShardNotFound {
path: PathBuf,
},
ManifestMismatch {
shard: PathBuf,
expected_hash: String,
actual_hash: String,
},
OversizedPayload {
size: usize,
max: usize,
},
HashCollision,
WriteFailed {
reason: String,
},
SerializeFailed {
reason: String,
},
}Expand description
Errors related to event parsing, writing, and validation.
Variants§
ParseFailed
A line in the event file could not be parsed.
Fields
UnknownType
The event type string is not recognized.
InvalidTimestamp
A timestamp in an event line is malformed.
ShardNotFound
The referenced shard file does not exist on disk.
ManifestMismatch
A sealed shard’s content does not match its manifest.
Fields
OversizedPayload
An event payload exceeds the maximum allowed size.
HashCollision
An event line contains an invalid hash.
WriteFailed
Failed to write an event to the shard file.
SerializeFailed
JSON serialization of event data failed.
Implementations§
Source§impl EventError
impl EventError
Sourcepub const fn error_code(&self) -> &'static str
pub const fn error_code(&self) -> &'static str
Machine-readable error code.
Sourcepub fn suggestion(&self) -> String
pub fn suggestion(&self) -> String
Human-readable suggestion.
Trait Implementations§
Source§impl Debug for EventError
impl Debug for EventError
Source§impl Display for EventError
impl Display for EventError
Source§impl Error for EventError
impl Error for EventError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<EventError> for BonesError
impl From<EventError> for BonesError
Source§fn from(source: EventError) -> Self
fn from(source: EventError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for EventError
impl RefUnwindSafe for EventError
impl Send for EventError
impl Sync for EventError
impl Unpin for EventError
impl UnsafeUnpin for EventError
impl UnwindSafe for EventError
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