pub struct PacketHandler<T, const N: usize, const M: usize> {
pub wrapped: T,
pub buf: Vec<u8, N>,
pub wbuf: Vec<u8, M>,
}
Fields§
§wrapped: T
§buf: Vec<u8, N>
§wbuf: Vec<u8, M>
Implementations§
Trait Implementations§
Source§impl<T: Clone, const N: usize, const M: usize> Clone for PacketHandler<T, N, M>
impl<T: Clone, const N: usize, const M: usize> Clone for PacketHandler<T, N, M>
Source§fn clone(&self) -> PacketHandler<T, N, M>
fn clone(&self) -> PacketHandler<T, N, M>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<T: Ord, const N: usize, const M: usize> Ord for PacketHandler<T, N, M>
impl<T: Ord, const N: usize, const M: usize> Ord for PacketHandler<T, N, M>
Source§fn cmp(&self, other: &PacketHandler<T, N, M>) -> Ordering
fn cmp(&self, other: &PacketHandler<T, N, M>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<T: PartialOrd, const N: usize, const M: usize> PartialOrd for PacketHandler<T, N, M>
impl<T: PartialOrd, const N: usize, const M: usize> PartialOrd for PacketHandler<T, N, M>
Source§impl<T: ReadPacket<N>, const N: usize, const M: usize> Read for PacketHandler<T, N, M>
impl<T: ReadPacket<N>, const N: usize, const M: usize> Read for PacketHandler<T, N, M>
Source§fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error>
fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error>
Read some bytes from this source into the specified buffer, returning how many bytes were read. Read more
Source§fn read_exact(
&mut self,
buf: &mut [u8],
) -> Result<(), ReadExactError<Self::Error>>
fn read_exact( &mut self, buf: &mut [u8], ) -> Result<(), ReadExactError<Self::Error>>
Read the exact number of bytes required to fill
buf
. Read moreSource§impl<T: AsyncReadPacket<N>, const N: usize, const M: usize> Read for PacketHandler<T, N, M>
impl<T: AsyncReadPacket<N>, const N: usize, const M: usize> Read for PacketHandler<T, N, M>
Source§async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error>
async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error>
Read some bytes from this source into the specified buffer, returning how many bytes were read. Read more
Source§async fn read_exact(
&mut self,
buf: &mut [u8],
) -> Result<(), ReadExactError<Self::Error>>
async fn read_exact( &mut self, buf: &mut [u8], ) -> Result<(), ReadExactError<Self::Error>>
Read the exact number of bytes required to fill
buf
. Read moreSource§impl<T: WritePacket<N>, const N: usize, const M: usize> Write for PacketHandler<T, M, N>
impl<T: WritePacket<N>, const N: usize, const M: usize> Write for PacketHandler<T, M, N>
Source§fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error>
fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error>
Write a buffer into this writer, returning how many bytes were written. Read more
Source§fn flush(&mut self) -> Result<(), Self::Error>
fn flush(&mut self) -> Result<(), Self::Error>
Flush this output stream, blocking until all intermediately buffered contents reach their destination.
Source§impl<T: AsyncWritePacket<N>, const N: usize, const M: usize> Write for PacketHandler<T, M, N>
impl<T: AsyncWritePacket<N>, const N: usize, const M: usize> Write for PacketHandler<T, M, N>
Source§async fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error>
async fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error>
Write a buffer into this writer, returning how many bytes were written. Read more
impl<T: Eq, const N: usize, const M: usize> Eq for PacketHandler<T, N, M>
impl<T, const N: usize, const M: usize> StructuralPartialEq for PacketHandler<T, N, M>
Auto Trait Implementations§
impl<T, const N: usize, const M: usize> Freeze for PacketHandler<T, N, M>where
T: Freeze,
impl<T, const N: usize, const M: usize> RefUnwindSafe for PacketHandler<T, N, M>where
T: RefUnwindSafe,
impl<T, const N: usize, const M: usize> Send for PacketHandler<T, N, M>where
T: Send,
impl<T, const N: usize, const M: usize> Sync for PacketHandler<T, N, M>where
T: Sync,
impl<T, const N: usize, const M: usize> Unpin for PacketHandler<T, N, M>where
T: Unpin,
impl<T, const N: usize, const M: usize> UnwindSafe for PacketHandler<T, N, M>where
T: UnwindSafe,
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