[][src]Struct smoltcp::iface::NeighborCache

pub struct NeighborCache<'a> { /* fields omitted */ }

A neighbor cache backed by a map.

Examples

On systems with heap, this cache can be created with:

use std::collections::BTreeMap;
use smoltcp::iface::NeighborCache;
let mut neighbor_cache = NeighborCache::new(BTreeMap::new());

On systems without heap, use:

use smoltcp::iface::NeighborCache;
let mut neighbor_cache_storage = [None; 8];
let mut neighbor_cache = NeighborCache::new(&mut neighbor_cache_storage[..]);

Methods

impl<'a> Cache<'a>[src]

pub fn new<T>(storage: T) -> Cache<'a> where
    T: Into<ManagedMap<'a, IpAddress, Neighbor>>, 
[src]

Create a cache. The backing storage is cleared upon creation.

Panics

This function panics if storage.len() == 0.

pub fn new_with_limit<T>(storage: T, gc_threshold: usize) -> Cache<'a> where
    T: Into<ManagedMap<'a, IpAddress, Neighbor>>, 
[src]

pub fn fill(
    &mut self,
    protocol_addr: IpAddress,
    hardware_addr: EthernetAddress,
    timestamp: Instant
)
[src]

Trait Implementations

impl<'a> Debug for Cache<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for Cache<'a>

impl<'a> Send for Cache<'a>

impl<'a> Sync for Cache<'a>

impl<'a> Unpin for Cache<'a>

impl<'a> !UnwindSafe for Cache<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.