pub enum WireEvent<T> {
Known(T),
Unknown {
event_type: String,
value: UnknownPayload,
},
Corrupt(Error),
}Expand description
One classified wire frame.
Variants§
Known(T)
The frame carries a discriminator this client models and its payload decoded fully.
Unknown
Valid JSON not recognized by this classifier. Drivers log structural metadata only and skip interpretation.
Fields
value: UnknownPayloadFull payload for raw passthrough, never warning logs. Debug is redacted.
Corrupt(Error)
Invalid JSON or a recognized frame that failed typed decoding.
Must not be demoted to Unknown.
Implementations§
Source§impl<T> WireEvent<T>
impl<T> WireEvent<T>
Sourcepub fn unrecognized(
event_type: impl Into<String>,
detail: impl Into<String>,
) -> WireEvent<T>
pub fn unrecognized( event_type: impl Into<String>, detail: impl Into<String>, ) -> WireEvent<T>
An event a typed transport (an SDK event stream, a gRPC stream) reported that this client does not model. The detail is kept for raw passthrough, never for warning logs.
Sourcepub fn malformed(message: impl Display) -> WireEvent<T>
pub fn malformed(message: impl Display) -> WireEvent<T>
A modeled event a typed transport failed to decode.
Sourcepub fn map<U>(self, f: impl FnOnce(T) -> U) -> WireEvent<U>
pub fn map<U>(self, f: impl FnOnce(T) -> U) -> WireEvent<U>
Map the Known payload, preserving the classification.
This is how an adapter layers a pure event-shape mapping on top of a
classifier without restating the triage: Unknown and Corrupt pass
through untouched, so policy stays with the driver.