pub struct Cache { /* private fields */ }Expand description
A file-backed implementation of Store.
Implementations
Trait Implementations
sourceimpl Store for Cache
impl Store for Cache
sourcefn get_mut(&mut self, ip: &IpAddr) -> Option<&mut KnownAddress>
fn get_mut(&mut self, ip: &IpAddr) -> Option<&mut KnownAddress>
Get a known peer address mutably.
sourcefn get(&self, ip: &IpAddr) -> Option<&KnownAddress>
fn get(&self, ip: &IpAddr) -> Option<&KnownAddress>
Get a known peer address.
sourcefn remove(&mut self, ip: &IpAddr) -> Option<KnownAddress>
fn remove(&mut self, ip: &IpAddr) -> Option<KnownAddress>
Remove an address from the store.
sourcefn insert(&mut self, ip: IpAddr, ka: KnownAddress) -> bool
fn insert(&mut self, ip: IpAddr, ka: KnownAddress) -> bool
Insert a new address into the store. Returns
true if the address was inserted,
or false if it was already known. Read moreAuto Trait Implementations
impl RefUnwindSafe for Cache
impl Send for Cache
impl Sync for Cache
impl Unpin for Cache
impl UnwindSafe for Cache
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more