pub enum DatagramBuffer {
Disabled,
Bytes(usize),
}Expand description
How much room to give incoming QUIC datagrams.
This exists instead of Option<Option<usize>>, and the nested option is not
a matter of taste. Written down, the outer None and the inner None are
the same three characters: {datagram_receive_buffer: null} in a
hand-written file deserializes to the outer None, so an author who
wrote it to disable datagram reception silently gets “change nothing”, and
their datagrams keep arriving. deny_unknown_fields cannot catch it — the
key is well known and the value is well typed. Naming the two answers makes
them impossible to confuse.
Variants§
Disabled
Refuse incoming datagrams entirely.
Bytes(usize)
Accept incoming datagrams, buffering up to this many bytes.
Trait Implementations§
Source§impl Clone for DatagramBuffer
impl Clone for DatagramBuffer
Source§fn clone(&self) -> DatagramBuffer
fn clone(&self) -> DatagramBuffer
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for DatagramBuffer
Source§impl Debug for DatagramBuffer
impl Debug for DatagramBuffer
impl Eq for DatagramBuffer
Source§impl PartialEq for DatagramBuffer
impl PartialEq for DatagramBuffer
impl StructuralPartialEq for DatagramBuffer
Auto Trait Implementations§
impl Freeze for DatagramBuffer
impl RefUnwindSafe for DatagramBuffer
impl Send for DatagramBuffer
impl Sync for DatagramBuffer
impl Unpin for DatagramBuffer
impl UnsafeUnpin for DatagramBuffer
impl UnwindSafe for DatagramBuffer
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