#[repr(u32)]pub enum MapType {
Array = 1,
HashMap = 2,
RingBuffer = 3,
PercpuArray = 4,
DevmapHash = 5,
LpmTrie = 6,
}Expand description
Type of an eBPF maps.
Variants§
Array = 1
An array map. Equivalent to BPF_MAP_TYPE_ARRAY.
HashMap = 2
A hash map. Equivalent to BPF_MAP_TYPE_HASH.
RingBuffer = 3
A hash map. Equivalent to BPF_MAP_TYPE_RINGBUF.
PercpuArray = 4
A per-CPU array. Equivalent to BPF_MAP_TYPE_PERCPU_ARRAY.
DevmapHash = 5
A device-map that holds references to network devices. Equivalent to
BPF_MAP_TYPE_DEVMAP.
LpmTrie = 6
A longest prefix match trie. Equivalent to BPF_MAP_TYPE_LPM_TRIE.
Implementations§
Trait Implementations§
Source§impl<D> Decode<MapType, D> for MapTypewhere
D: ResourceDialect,
impl<D> Decode<MapType, D> for MapTypewhere
D: ResourceDialect,
Source§impl Ord for MapType
impl Ord for MapType
Source§impl PartialOrd for MapType
impl PartialOrd for MapType
Source§impl TypeMarker for MapType
impl TypeMarker for MapType
Source§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
Returns the minimum required alignment of the inline portion of the
encoded object. It must be a (nonzero) power of two.
Source§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
Returns the size of the inline portion of the encoded object, including
padding for alignment. Must be a multiple of
inline_align.Source§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Returns true if the memory layout of
Self::Owned matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned to a single memcpy. Read moreSource§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Returns true if the memory layout of
Self::Owned matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned to a single memcpy.Source§impl ValueTypeMarker for MapType
impl ValueTypeMarker for MapType
Source§type Borrowed<'a> = MapType
type Borrowed<'a> = MapType
The Rust type to use for encoding. This is a particular
Encode<Self>
type cheaply obtainable from &Self::Owned. There are three cases: Read moreSource§fn borrow(
value: &<MapType as TypeMarker>::Owned,
) -> <MapType as ValueTypeMarker>::Borrowed<'_>
fn borrow( value: &<MapType as TypeMarker>::Owned, ) -> <MapType as ValueTypeMarker>::Borrowed<'_>
Cheaply converts from
&Self::Owned to Self::Borrowed.impl Copy for MapType
impl Eq for MapType
impl StructuralPartialEq for MapType
Auto Trait Implementations§
impl Freeze for MapType
impl RefUnwindSafe for MapType
impl Send for MapType
impl Sync for MapType
impl Unpin for MapType
impl UnwindSafe for MapType
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