pub struct OkPacket<'a> { /* private fields */ }
Expand description
Represents MySql’s Ok packet.
Implementations§
Source§impl OkPacket<'_>
impl OkPacket<'_>
pub fn into_owned(self) -> OkPacket<'static>
Sourcepub fn affected_rows(&self) -> u64
pub fn affected_rows(&self) -> u64
Value of the affected_rows field of an Ok packet.
Sourcepub fn last_insert_id(&self) -> Option<u64>
pub fn last_insert_id(&self) -> Option<u64>
Value of the last_insert_id field of an Ok packet.
Sourcepub fn status_flags(&self) -> StatusFlags
pub fn status_flags(&self) -> StatusFlags
Value of the status_flags field of an Ok packet.
Sourcepub fn info_ref(&self) -> Option<&[u8]>
pub fn info_ref(&self) -> Option<&[u8]>
Value of the info field of an Ok packet as a byte slice.
Sourcepub fn info_str(&self) -> Option<Cow<'_, str>>
pub fn info_str(&self) -> Option<Cow<'_, str>>
Value of the info field of an Ok packet as a string (lossy converted).
Sourcepub fn session_state_info_ref(&self) -> Option<&[u8]>
pub fn session_state_info_ref(&self) -> Option<&[u8]>
Returns raw reference to a session state info.
Sourcepub fn session_state_info(&self) -> Result<Vec<SessionStateInfo<'_>>, Error>
pub fn session_state_info(&self) -> Result<Vec<SessionStateInfo<'_>>, Error>
Tries to parse session state info, if any.
Trait Implementations§
Source§impl<'de, T> From<OkPacketDeserializer<'de, T>> for OkPacket<'de>
impl<'de, T> From<OkPacketDeserializer<'de, T>> for OkPacket<'de>
Source§fn from(x: OkPacketDeserializer<'de, T>) -> OkPacket<'de>
fn from(x: OkPacketDeserializer<'de, T>) -> OkPacket<'de>
Converts to this type from the input type.
Source§impl<'a> TryFrom<OkPacketBody<'a>> for OkPacket<'a>
impl<'a> TryFrom<OkPacketBody<'a>> for OkPacket<'a>
impl<'a> Eq for OkPacket<'a>
impl<'a> StructuralPartialEq for OkPacket<'a>
Auto Trait Implementations§
impl<'a> Freeze for OkPacket<'a>
impl<'a> RefUnwindSafe for OkPacket<'a>
impl<'a> Send for OkPacket<'a>
impl<'a> Sync for OkPacket<'a>
impl<'a> Unpin for OkPacket<'a>
impl<'a> UnwindSafe for OkPacket<'a>
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
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.