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
use crate::misc::Lease;

#[derive(Debug)]
pub(crate) struct DecodeWrapperProtocol<'inner, 'outer, O> {
  pub(crate) bytes: &'outer mut &'inner [u8],
  pub(crate) other: O,
}

impl<O> Lease<[u8]> for DecodeWrapperProtocol<'_, '_, O> {
  #[inline]
  fn lease(&self) -> &[u8] {
    self.bytes
  }
}