Enum MapType
#[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§
§impl MapType
impl MapType
pub fn from_primitive(prim: u32) -> Option<MapType>
pub const fn into_primitive(self) -> u32
pub fn is_unknown(&self) -> bool
👎Deprecated: Strict enums should not use
is_unknown
Trait Implementations§
§impl<D> Decode<MapType, D> for MapTypewhere
D: ResourceDialect,
impl<D> Decode<MapType, D> for MapTypewhere
D: ResourceDialect,
§impl Ord for MapType
impl Ord for MapType
§impl PartialOrd for MapType
impl PartialOrd for MapType
§impl TypeMarker for MapType
impl TypeMarker for MapType
§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.
§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
.§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 more§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.§impl ValueTypeMarker for MapType
impl ValueTypeMarker for MapType
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