pub enum LookupPolicy {
RouterAndKey,
KeyFirst,
}Expand description
How a request reaches a lookup record (LookupInfo.policy, spec
§9.5.2).
Variants§
RouterAndKey
router_and_key (the default, also when the field is absent): the
φ router sends the request to the record, the table then looks the
key up in it; a request the router sent to the backbone never
reaches the table.
KeyFirst
key_first: a STRONG key in the message (is_strong_key) sends
the request to the record even when the router picked the backbone
(the backbone nearest, a novel input, the margin not beaten); a
one-word key still needs the router’s decision.
Implementations§
Source§impl LookupPolicy
impl LookupPolicy
Sourcepub fn of(info: &LookupInfo) -> Self
pub fn of(info: &LookupInfo) -> Self
The policy a record declares (LookupInfo::policy_label). A
value this reader does not know (a newer writer’s policy, a hand
edit) is router_and_key — the conservative reading, the one a
reader from before the field existed applies — and never a reason
to refuse the file (review KF-6; CmfModel::open warns once, the
writers lookup-build / lookup-policy refuse such a value).
Sourcepub fn is_known(info: &LookupInfo) -> bool
pub fn is_known(info: &LookupInfo) -> bool
Does the record declare a policy this reader knows (absent = the default, known)?
pub fn label(self) -> &'static str
Trait Implementations§
Source§impl Clone for LookupPolicy
impl Clone for LookupPolicy
impl Copy for LookupPolicy
Source§impl Debug for LookupPolicy
impl Debug for LookupPolicy
Source§impl Default for LookupPolicy
impl Default for LookupPolicy
impl Eq for LookupPolicy
Source§impl PartialEq for LookupPolicy
impl PartialEq for LookupPolicy
impl StructuralPartialEq for LookupPolicy
Auto Trait Implementations§
impl Freeze for LookupPolicy
impl RefUnwindSafe for LookupPolicy
impl Send for LookupPolicy
impl Sync for LookupPolicy
impl Unpin for LookupPolicy
impl UnsafeUnpin for LookupPolicy
impl UnwindSafe for LookupPolicy
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.