pub enum Packet {
Ok(OkPacket),
Err(ServerError),
Eof(EofPacket),
AuthSwitch {
plugin: String,
data: Vec<u8>,
},
AuthMoreData(Vec<u8>),
Other(Vec<u8>),
}Expand description
A packet whose kind can be told from its first byte.
Only unambiguous in reply to a command. Inside a result set a leading 0x00
is a binary row and a leading 0xFE is a length-encoded integer, so rows
are parsed by the code that knows it asked for them.
Variants§
Ok(OkPacket)
Err(ServerError)
Eof(EofPacket)
AuthSwitch
The server wants a different authentication plugin than the one the handshake named.
AuthMoreData(Vec<u8>)
Plugin-specific data mid-authentication, such as caching_sha2’s verdict.
Other(Vec<u8>)
A payload the caller has to interpret itself — a result-set header.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Packet
impl RefUnwindSafe for Packet
impl Send for Packet
impl Sync for Packet
impl Unpin for Packet
impl UnsafeUnpin for Packet
impl UnwindSafe for Packet
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
Mutably borrows from an owned value. Read more