pub enum Decoded<E: AppEvent> {
Filter,
Permitted(E),
PermissionDenied(&'static str),
DecodeError(&'static str),
}Expand description
Outcome of a single RequestDecoder::decode call. The runtime
branches on this and never needs to know the underlying wire enum.
Variants§
Filter
Drop the request silently. For application messages that are not events — a subscription request arriving on a connection that only submits events, say. The protocol’s own frames never reach the decoder.
Permitted(E)
Request OK and authorized. The runtime publishes the event. Whether
it needs a timestamp is derived by the runtime from
AppEvent::is_query — query events bypass the journal and skip
the wall-clock stamp.
PermissionDenied(&'static str)
The connection’s role may not make this request. The static string is logged at debug level on the reader thread; the runtime drops the request.
DecodeError(&'static str)
Decode failure (unknown message, malformed body, invalid field). The runtime logs at debug level and drops the request; the connection is not closed (a misbehaving client drops itself on the next read timeout).