Struct redbpf::LruPerCpuHashMap[][src]

pub struct LruPerCpuHashMap<'a, K: Clone, V: Clone> { /* fields omitted */ }
Expand description

An LRU per-cpu BPF hash map structure

This provides higher level API for BPF maps whose type is BPF_MAP_TYPE_LRU_PERCPU_HASH

Implementations

Set per-cpu values to the BPF map at key

The number of elements in values should be equal to the number of possible CPUs. This requirement is automatically fulfilled when values is created by PerCpuValues::new

Err can be returned if the number of elements is wrong or underlying bpf_map_update_elem function returns a negative value.

Get per-cpu values corresponding to the key from the BPF map

If key is found, Some([PerCpuValues](./struct.PerCpuValues.html)) is returned.

Delete key from the BPF map

Return an iterator over all items in the map

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more