pub struct HashedConnectionIdGenerator { /* private fields */ }
Expand description
Generates 8-byte connection IDs that can be efficiently
validate
d
This generator uses a non-cryptographic hash and can therefore still be spoofed, but nonetheless helps prevents Quinn from responding to non-QUIC packets at very low cost.
Implementations§
Source§impl HashedConnectionIdGenerator
impl HashedConnectionIdGenerator
Trait Implementations§
Source§impl ConnectionIdGenerator for HashedConnectionIdGenerator
impl ConnectionIdGenerator for HashedConnectionIdGenerator
Source§fn generate_cid(&mut self) -> ConnectionId
fn generate_cid(&mut self) -> ConnectionId
Generates a new CID Read more
Source§fn validate(&self, cid: &ConnectionId) -> Result<(), InvalidCid>
fn validate(&self, cid: &ConnectionId) -> Result<(), InvalidCid>
Quickly determine whether
cid
could have been generated by this generator Read moreAuto Trait Implementations§
impl Freeze for HashedConnectionIdGenerator
impl RefUnwindSafe for HashedConnectionIdGenerator
impl Send for HashedConnectionIdGenerator
impl Sync for HashedConnectionIdGenerator
impl Unpin for HashedConnectionIdGenerator
impl UnwindSafe for HashedConnectionIdGenerator
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