Struct quinn_proto::RandomConnectionIdGenerator
source · pub struct RandomConnectionIdGenerator { /* private fields */ }
Expand description
Generates purely random connection IDs of a specified length
Random CIDs can be smaller than those produced by HashedConnectionIdGenerator
, but cannot be
usefully validate
d.
Implementations§
Trait Implementations§
source§impl Clone for RandomConnectionIdGenerator
impl Clone for RandomConnectionIdGenerator
source§fn clone(&self) -> RandomConnectionIdGenerator
fn clone(&self) -> RandomConnectionIdGenerator
Returns a copy 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 ConnectionIdGenerator for RandomConnectionIdGenerator
impl ConnectionIdGenerator for RandomConnectionIdGenerator
source§fn generate_cid(&mut self) -> ConnectionId
fn generate_cid(&mut self) -> ConnectionId
Generates a new CID Read more
source§fn cid_lifetime(&self) -> Option<Duration>
fn cid_lifetime(&self) -> Option<Duration>
Returns the lifetime of generated Connection IDs 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 moresource§impl Debug for RandomConnectionIdGenerator
impl Debug for RandomConnectionIdGenerator
impl Copy for RandomConnectionIdGenerator
Auto Trait Implementations§
impl Freeze for RandomConnectionIdGenerator
impl RefUnwindSafe for RandomConnectionIdGenerator
impl Send for RandomConnectionIdGenerator
impl Sync for RandomConnectionIdGenerator
impl Unpin for RandomConnectionIdGenerator
impl UnwindSafe for RandomConnectionIdGenerator
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)