pub struct PitToken(pub u64);Expand description
A stable, cheaply-copyable reference to a PIT entry.
Computed as a hash of (Name, Optionawait points without lifetime concerns.
Internally uses a two-phase hash: name components are hashed into a single
u64 via NameHashes, then combined with selector and forwarding-hint
hashes. This lets NameHashes pre-compute the name hash once at decode
and reuse it across all PIT probes — eliminating per-probe re-hashing in
PitMatchStage (which may probe 5 + 3*(N-1) combinations).
Tuple Fields§
§0: u64Implementations§
Source§impl PitToken
impl PitToken
Sourcepub fn from_interest(name: &Name, selector: Option<&Selector>) -> Self
pub fn from_interest(name: &Name, selector: Option<&Selector>) -> Self
Build a PIT token from Interest fields.
Per RFC 8569 §4.2, PIT aggregation uses (Name, Selectors, ForwardingHint) as the key.
Sourcepub fn from_interest_full(
name: &Name,
selector: Option<&Selector>,
forwarding_hint: Option<&[Arc<Name>]>,
) -> Self
pub fn from_interest_full( name: &Name, selector: Option<&Selector>, forwarding_hint: Option<&[Arc<Name>]>, ) -> Self
Build a PIT token including ForwardingHint for correct aggregation.
Sourcepub fn from_name_hash(
name_hash: u64,
selector: Option<&Selector>,
forwarding_hint: Option<&[Arc<Name>]>,
) -> Self
pub fn from_name_hash( name_hash: u64, selector: Option<&Selector>, forwarding_hint: Option<&[Arc<Name>]>, ) -> Self
Build a PIT token from a pre-computed name hash.
Use with NameHashes::full_hash or NameHashes::prefix_hash to
avoid re-hashing name components on every probe.
Trait Implementations§
impl Copy for PitToken
impl Eq for PitToken
impl StructuralPartialEq for PitToken
Auto Trait Implementations§
impl Freeze for PitToken
impl RefUnwindSafe for PitToken
impl Send for PitToken
impl Sync for PitToken
impl Unpin for PitToken
impl UnwindSafe for PitToken
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.