pub enum FrameKind {
Hello,
Data,
Error,
Subscribe,
Unsubscribe,
Credit,
Cursor,
}Expand description
What a stream carries.
Variants§
Hello
Connection negotiation; header-only.
Data
A transfer: header followed by opaque payload until FIN.
Error
Failure report on the reply half of an exchange; header-only.
Subscribe
Registration of interest in a publisher’s topics; header-only.
Unsubscribe
Withdrawal of a previous SUBSCRIBE; header-only.
Credit
An L2 consumer’s delivery limit for one subscription; header-only.
The credit of
decisions/0003 §4.2: a
subscription and an absolute delivery limit, so a lost or
duplicated frame changes nothing. Only a queue serves it; a path with
no queue refuses the stream with UNSUPPORTED.
Cursor
A report about one payload stream; header-only followed by records.
A head frame naming the stream, then (level, offset) records until
FIN. Never shares a stream with payload
(decisions/0024
§4.4).
Implementations§
Source§impl FrameKind
impl FrameKind
Sourcepub const fn from_u8(code: u8) -> Option<FrameKind>
pub const fn from_u8(code: u8) -> Option<FrameKind>
Interprets a wire code. Unknown kinds are a protocol violation, not a forward-compatibility hook: a receiver cannot know whether an unknown stream kind carries payload it would have to drain.
Sourcepub const fn has_payload(self) -> bool
pub const fn has_payload(self) -> bool
True if payload bytes follow the header until FIN.