pub struct ClientHandle { /* private fields */ }Expand description
A resolved position in the table.
One request touches the same client four times — admit, choose a response mode, record what was sent, then record the true transmit time after the packet leaves. Looking the key up each time cost four hashes of the same address, which callgrind put at ~51% of what the server does per request once the recency index was fixed. A handle turns the three follow-ups into array indexing.
It is deliberately not a raw index: the generation makes a handle that outlived its client detectably stale instead of quietly wrong.
Implementations§
Source§impl ClientHandle
impl ClientHandle
Sourcepub const INVALID: ClientHandle
pub const INVALID: ClientHandle
A handle that resolves to nothing — what a request rejected by the global limiter gets, having never reached a per-client record.
Trait Implementations§
Source§impl Clone for ClientHandle
impl Clone for ClientHandle
Source§fn clone(&self) -> ClientHandle
fn clone(&self) -> ClientHandle
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 ClientHandle
Source§impl Debug for ClientHandle
impl Debug for ClientHandle
impl Eq for ClientHandle
Source§impl PartialEq for ClientHandle
impl PartialEq for ClientHandle
impl StructuralPartialEq for ClientHandle
Auto Trait Implementations§
impl Freeze for ClientHandle
impl RefUnwindSafe for ClientHandle
impl Send for ClientHandle
impl Sync for ClientHandle
impl Unpin for ClientHandle
impl UnsafeUnpin for ClientHandle
impl UnwindSafe for ClientHandle
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