pub enum LogEvent {
Show 16 variants
RxData {
bytes: usize,
},
TxData {
bytes: usize,
},
Open,
Close,
Disconnect {
error: String,
},
ReconnectStart {
attempt: u32,
},
ReconnectSuccess,
ReconnectFailed {
attempt: u32,
error: String,
},
ReconnectExhausted,
MatchFound {
pattern: String,
mode: String,
},
Truncated {
observed: usize,
returned: usize,
},
ReadStarted,
ReadCompleted {
bytes: usize,
},
WriteStarted,
WriteCompleted {
bytes: usize,
},
Error {
message: String,
},
}Expand description
Typed event payloads stored in the log buffer.
The #[serde(tag = "event")] attribute ensures each entry carries a
"event" field naming the variant, producing clean JSONL output.
Variants§
RxData
RX data chunk received from the device.
TxData
TX data chunk sent to the device.
Open
Connection opened.
Close
Connection closed (explicitly by user).
Disconnect
Port disconnected (fatal I/O error).
ReconnectStart
Reconnect attempt started.
ReconnectSuccess
Reconnect succeeded.
ReconnectFailed
Reconnect attempt failed.
ReconnectExhausted
Max reconnect attempts exhausted.
MatchFound
Match found in read.
Truncated
Data truncated (bytes_returned < bytes_observed).
ReadStarted
Read operation started.
ReadCompleted
Read operation completed.
WriteStarted
Write operation started.
WriteCompleted
Write operation completed.
Error
Generic error.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for LogEvent
impl<'de> Deserialize<'de> for LogEvent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for LogEvent
impl JsonSchema for LogEvent
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreimpl StructuralPartialEq for LogEvent
Auto Trait Implementations§
impl Freeze for LogEvent
impl RefUnwindSafe for LogEvent
impl Send for LogEvent
impl Sync for LogEvent
impl Unpin for LogEvent
impl UnsafeUnpin for LogEvent
impl UnwindSafe for LogEvent
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