wtx 0.43.0

A collection of different transport implementations and related tools focused primarily on web technologies.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::{
  codec::Encode,
  database::client::mysql::protocol::{Protocol, encode_wrapper_protocol::EncodeWrapperProtocol},
};

pub(crate) struct AuthSwitchReq<'bytes>(pub(crate) &'bytes [u8]);

impl<E> Encode<Protocol<(), E>> for AuthSwitchReq<'_>
where
  E: From<crate::Error>,
{
  #[inline]
  fn encode(&self, ew: &mut EncodeWrapperProtocol<'_>) -> Result<(), E> {
    ew.encode_buffer.extend_from_copyable_slice(self.0)?;
    Ok(())
  }
}