pub struct Request<'a> {
pub opcode: u8,
pub payload: &'a [u8],
pub session: Option<SessionId>,
pub exchange: ExchangeId,
pub groupcast: bool,
}Expand description
One arriving interaction-model message, with the exchange facts §8.7.4 keys its window on.
Constructible as a literal: an unsecured session is session: None, which
Request::new cannot express.
Fields§
§opcode: u8The protocol opcode (§10.2.1).
payload: &'a [u8]The message body, everything after the protocol header.
session: Option<SessionId>Which secure session it arrived on, None for an unsecured one.
§8.7.4’s window is keyed by session and exchange, so that one client’s Timed Request cannot be spent by another’s Write on a coincidentally equal exchange id.
exchange: ExchangeIdThe exchange it arrived on.
groupcast: boolWhether it arrived as a groupcast.
§8.7.2.3: “If this action was unicast and SuppressResponse is FALSE, a Write Response action SHALL be generated … otherwise no Write Response SHALL be sent.” A groupcast write is answered by silence whatever the flag says.