Struct quinn_proto::HashedConnectionIdGenerator
source · 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