#[repr(u8)]pub enum MessageKind {
Show 36 variants
Query = 1,
Result = 2,
Error = 3,
BulkInsert = 4,
BulkOk = 5,
BulkInsertBinary = 6,
QueryBinary = 7,
BulkInsertPrevalidated = 8,
BulkStreamStart = 9,
BulkStreamRows = 10,
BulkStreamCommit = 11,
BulkStreamAck = 12,
Prepare = 13,
PreparedOk = 14,
ExecutePrepared = 15,
Hello = 16,
HelloAck = 17,
AuthRequest = 18,
AuthResponse = 19,
AuthOk = 20,
AuthFail = 21,
Bye = 22,
Ping = 23,
Pong = 24,
Get = 25,
Delete = 26,
DeleteOk = 27,
Cancel = 32,
Compress = 33,
SetSession = 34,
Notice = 35,
RowDescription = 36,
StreamEnd = 37,
VectorSearch = 38,
GraphTraverse = 39,
QueryWithParams = 40,
}Expand description
Single-byte message-kind discriminator. Numeric values are part of the wire spec — never repurpose a value once shipped.
Variants§
Query = 1
Result = 2
Error = 3
BulkInsert = 4
BulkOk = 5
BulkInsertBinary = 6
QueryBinary = 7
BulkInsertPrevalidated = 8
BulkStreamStart = 9
BulkStreamRows = 10
BulkStreamCommit = 11
BulkStreamAck = 12
Prepare = 13
PreparedOk = 14
ExecutePrepared = 15
Hello = 16
HelloAck = 17
AuthRequest = 18
AuthResponse = 19
AuthOk = 20
AuthFail = 21
Bye = 22
Ping = 23
Pong = 24
Get = 25
Delete = 26
DeleteOk = 27
Cancel = 32
Compress = 33
SetSession = 34
Notice = 35
RowDescription = 36
StreamEnd = 37
VectorSearch = 38
GraphTraverse = 39
QueryWithParams = 40
Implementations§
Source§impl MessageKind
impl MessageKind
Sourcepub fn class(&self) -> MessageClass
pub fn class(&self) -> MessageClass
Routing class derived from the comment-grouped wire ranges.
Sourcepub fn allowed_flags(&self) -> Flags
pub fn allowed_flags(&self) -> Flags
Bitset of Flags values this kind may legitimately carry.
Pinned conservatively: MORE_FRAMES is universal (any frame
may be split), but COMPRESSED is whitelisted only on kinds
whose payloads are big enough to benefit from compression.
Handshake/lifecycle payloads (Hello, AuthRequest, Ping, …)
are tiny and stay uncompressed today; future contributors
who want to flip that decision must update both the matrix
and the unit tests that pin it.
Sourcepub fn is_handshake(&self) -> bool
pub fn is_handshake(&self) -> bool
true when this kind belongs to the handshake/lifecycle group
(Hello, AuthRequest, AuthOk, …, Bye, Ping, Pong). Equivalent to
class() == MessageClass::Handshake and exists so dispatch sites
can read the predicate without importing MessageClass.
Sourcepub fn permits_flags(&self, flags: Flags) -> bool
pub fn permits_flags(&self, flags: Flags) -> bool
true when every flag bit in flags is in allowed_flags().
The catalog is the single source of truth for which flag bits a
kind may carry; both the codec (decode side) and the builder
(encode side) consult this so a misframed frame fails at the
boundary rather than reaching the dispatch arms.
Sourcepub fn direction(&self) -> MessageDirection
pub fn direction(&self) -> MessageDirection
Which peer is allowed to originate this kind.
pub fn from_u8(byte: u8) -> Option<Self>
Trait Implementations§
Source§impl Clone for MessageKind
impl Clone for MessageKind
Source§fn clone(&self) -> MessageKind
fn clone(&self) -> MessageKind
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MessageKind
impl Debug for MessageKind
Source§impl PartialEq for MessageKind
impl PartialEq for MessageKind
Source§fn eq(&self, other: &MessageKind) -> bool
fn eq(&self, other: &MessageKind) -> bool
self and other values to be equal, and is used by ==.