#[repr(u8)]pub enum MessageKind {
Show 35 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,
}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
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<MessageKind>
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 ==.impl Copy for MessageKind
impl Eq for MessageKind
impl StructuralPartialEq for MessageKind
Auto Trait Implementations§
impl Freeze for MessageKind
impl RefUnwindSafe for MessageKind
impl Send for MessageKind
impl Sync for MessageKind
impl Unpin for MessageKind
impl UnsafeUnpin for MessageKind
impl UnwindSafe for MessageKind
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request