pub struct TdsCodec { /* private fields */ }Expand description
TDS packet codec for tokio-util framing.
This codec handles the low-level encoding and decoding of TDS packets over a byte stream.
Implementations§
Source§impl TdsCodec
impl TdsCodec
Sourcepub fn with_max_packet_size(self, size: usize) -> Self
pub fn with_max_packet_size(self, size: usize) -> Self
Create a new TDS codec with a custom maximum packet size.
Sourcepub fn reset_packet_id(&mut self)
pub fn reset_packet_id(&mut self)
Reset the packet ID counter.
Trait Implementations§
Source§impl Decoder for TdsCodec
impl Decoder for TdsCodec
Source§type Error = CodecError
type Error = CodecError
The type of unrecoverable frame decoding errors. Read more
Source§fn decode(
&mut self,
src: &mut BytesMut,
) -> Result<Option<Self::Item>, Self::Error>
fn decode( &mut self, src: &mut BytesMut, ) -> Result<Option<Self::Item>, Self::Error>
Attempts to decode a frame from the provided buffer of bytes. Read more
Auto Trait Implementations§
impl Freeze for TdsCodec
impl RefUnwindSafe for TdsCodec
impl Send for TdsCodec
impl Sync for TdsCodec
impl Unpin for TdsCodec
impl UnwindSafe for TdsCodec
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