Struct mysql_common::packets::HandshakePacket
source · pub struct HandshakePacket<'a> { /* private fields */ }
Expand description
Represents MySql’s initial handshake packet.
Implementations
sourceimpl<'a> HandshakePacket<'a>
impl<'a> HandshakePacket<'a>
pub fn into_owned(self) -> HandshakePacket<'static>
sourcepub fn protocol_version(&self) -> u8
pub fn protocol_version(&self) -> u8
Value of the protocol_version field of an initial handshake packet.
sourcepub fn server_version_ref(&self) -> &[u8]ⓘ
pub fn server_version_ref(&self) -> &[u8]ⓘ
Value of the server_version field of an initial handshake packet as a byte slice.
sourcepub fn server_version_str(&self) -> Cow<'_, str>
pub fn server_version_str(&self) -> Cow<'_, str>
Value of the server_version field of an initial handshake packet as a string (lossy converted).
sourcepub fn server_version_parsed(&self) -> Option<(u16, u16, u16)>
pub fn server_version_parsed(&self) -> Option<(u16, u16, u16)>
Parsed server version.
Will parse first \d+.\d+.\d+ of a server version string (if any).
sourcepub fn maria_db_server_version_parsed(&self) -> Option<(u16, u16, u16)>
pub fn maria_db_server_version_parsed(&self) -> Option<(u16, u16, u16)>
Parsed mariadb server version.
sourcepub fn connection_id(&self) -> u32
pub fn connection_id(&self) -> u32
Value of the connection_id field of an initial handshake packet.
sourcepub fn scramble_1_ref(&self) -> &[u8]ⓘ
pub fn scramble_1_ref(&self) -> &[u8]ⓘ
Value of the scramble_1 field of an initial handshake packet as a byte slice.
sourcepub fn scramble_2_ref(&self) -> Option<&[u8]>
pub fn scramble_2_ref(&self) -> Option<&[u8]>
Value of the scramble_2 field of an initial handshake packet as a byte slice.
sourcepub fn capabilities(&self) -> CapabilityFlags
pub fn capabilities(&self) -> CapabilityFlags
Value of a server capabilities.
sourcepub fn default_collation(&self) -> u8
pub fn default_collation(&self) -> u8
Value of the default_collation field of an initial handshake packet.
sourcepub fn status_flags(&self) -> StatusFlags
pub fn status_flags(&self) -> StatusFlags
Value of a status flags.
sourcepub fn auth_plugin_name_ref(&self) -> Option<&[u8]>
pub fn auth_plugin_name_ref(&self) -> Option<&[u8]>
Value of the auth_plugin_name field of an initial handshake packet as a byte slice.
sourcepub fn auth_plugin_name_str(&self) -> Option<Cow<'_, str>>
pub fn auth_plugin_name_str(&self) -> Option<Cow<'_, str>>
Value of the auth_plugin_name field of an initial handshake packet as a string (lossy converted).
sourcepub fn auth_plugin(&self) -> Option<&AuthPlugin<'_>>
pub fn auth_plugin(&self) -> Option<&AuthPlugin<'_>>
Auth plugin of a handshake packet