pub struct BufFactory;Implementations§
Source§impl BufFactory
impl BufFactory
Sourcepub const DGRAM_HEADROOM: usize = 16
pub const DGRAM_HEADROOM: usize = 16
Sized to hold two QUIC varints (max 8 bytes each).
pub const MAX_BUF_SIZE: usize
Sourcepub fn get_max_dgram_buf() -> DgramBuffer
pub fn get_max_dgram_buf() -> DgramBuffer
Return a DgramBuffer with enough capacity for MAX_DATAGRAM_SIZE
payload bytes and enough headroom for two QUIC varints.
Trait Implementations§
Source§impl BufFactory for BufFactory
impl BufFactory for BufFactory
Source§type Buf = Bytes
type Buf = Bytes
The type of the generated buffer. The clone operation should be cheap,
e.g., by using an
Arc.Source§type DgramBuf = DgramBuffer
type DgramBuf = DgramBuffer
The type of generated buffers used for datagrams. These do not need to
be cloneable.
Source§fn buf_from_slice(buf: &[u8]) -> Bytes
fn buf_from_slice(buf: &[u8]) -> Bytes
Generate a new buffer from a given slice, the buffer must contain the
same data as the original slice.
Source§fn dgram_buf_from_slice(buf: &[u8]) -> DgramBuffer
fn dgram_buf_from_slice(buf: &[u8]) -> DgramBuffer
Generate a new datagram buffer from a given slice, the buffer must
contain the same data as the original slice.
Source§impl Clone for BufFactory
impl Clone for BufFactory
Source§fn clone(&self) -> BufFactory
fn clone(&self) -> BufFactory
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 Debug for BufFactory
impl Debug for BufFactory
Source§impl Default for BufFactory
impl Default for BufFactory
Source§fn default() -> BufFactory
fn default() -> BufFactory
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for BufFactory
impl RefUnwindSafe for BufFactory
impl Send for BufFactory
impl Sync for BufFactory
impl Unpin for BufFactory
impl UnsafeUnpin for BufFactory
impl UnwindSafe for BufFactory
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more