Struct smoltcp::iface::SliceArpCache [] [src]

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

An Address Resolution Protocol cache backed by a slice.

This cache uses a fixed-size storage, binary search, and a least recently used eviction strategy.

Examples

On systems with heap, this cache can be created with: rust use smoltcp::iface::SliceArpCache; let mut arp_cache = SliceArpCache::new(vec![Default::default(); 8]);

On systems without heap, use: rust use smoltcp::iface::SliceArpCache; let mut arp_cache_storage = [Default::default(); 8]; let mut arp_cache = SliceArpCache::new(&mut arp_cache_storage[..]);

Methods

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

[src]

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

Panics

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

Trait Implementations

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

[src]

Update the cache to map given protocol address to given hardware address.

[src]

Look up the hardware address corresponding for the given protocol address.