pub struct PacketCodec {
pub max_allowed_packet: usize,
/* private fields */
}Expand description
Codec for MySql protocol packets.
Codec supports both plain and compressed protocols.
Fields§
§max_allowed_packet: usizeMaximum size of a packet for this codec.
Implementations§
Source§impl PacketCodec
impl PacketCodec
Sourcepub fn reset_seq_id(&mut self)
pub fn reset_seq_id(&mut self)
Sets sequence id to 0.
Sourcepub fn sync_seq_id(&mut self)
pub fn sync_seq_id(&mut self)
Overwrites plain sequence id with compressed sequence id.
Sourcepub fn compress(&mut self, level: Compression)
pub fn compress(&mut self, level: Compression)
Turns compression on.
Trait Implementations§
Source§impl Debug for PacketCodec
impl Debug for PacketCodec
Auto Trait Implementations§
impl Freeze for PacketCodec
impl RefUnwindSafe for PacketCodec
impl Send for PacketCodec
impl Sync for PacketCodec
impl Unpin for PacketCodec
impl UnwindSafe for PacketCodec
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