pub struct NegativeCache {
pub ip: [u8; 4],
pub until_ms: u64,
}Expand description
ARP 解決に失敗した宛先を一定時間おぼえておくための否定キャッシュ。
同じ到達不能な宛先へ DNS のリトライ等が連続する場合、毎回 2 秒のブロッキング 解決を払うのを避けるためにある。期限切れの判定を誤ると、一時的な失敗が 恒久的な通信不能として残り続けるため単体で検証できるようにした。
Fields§
§ip: [u8; 4]§until_ms: u64Implementations§
Source§impl NegativeCache
impl NegativeCache
Trait Implementations§
Source§impl Clone for NegativeCache
impl Clone for NegativeCache
Source§fn clone(&self) -> NegativeCache
fn clone(&self) -> NegativeCache
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 NegativeCache
Source§impl Debug for NegativeCache
impl Debug for NegativeCache
impl Eq for NegativeCache
Source§impl PartialEq for NegativeCache
impl PartialEq for NegativeCache
Source§fn eq(&self, other: &NegativeCache) -> bool
fn eq(&self, other: &NegativeCache) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for NegativeCache
Auto Trait Implementations§
impl Freeze for NegativeCache
impl RefUnwindSafe for NegativeCache
impl Send for NegativeCache
impl Sync for NegativeCache
impl Unpin for NegativeCache
impl UnsafeUnpin for NegativeCache
impl UnwindSafe for NegativeCache
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,
§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
Checks if this value is equivalent to the given key. Read more
§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
Compare self to
key and return true if they are equal.