pub struct MapVTable {
pub init: unsafe fn(ptr: *mut u8, size_hint: Option<usize>),
pub insert: unsafe fn(_: *mut u8, key: Partial<'_>, value: Partial<'_>),
pub len: unsafe fn(ptr: *const u8) -> usize,
pub contains_key: unsafe fn(ptr: *const u8, key: &str) -> bool,
pub get_value_ptr: unsafe fn(ptr: *const u8, key: &str) -> *const u8,
pub iter: unsafe fn(ptr: *const u8) -> *const u8,
pub iter_vtable: MapIterVTable,
}
Expand description
Virtual table for a Map<String, T>
Fields§
§init: unsafe fn(ptr: *mut u8, size_hint: Option<usize>)
Initialize an empty map at the given pointer
insert: unsafe fn(_: *mut u8, key: Partial<'_>, value: Partial<'_>)
Insert a key-value pair into the map
len: unsafe fn(ptr: *const u8) -> usize
Get the number of entries in the map
contains_key: unsafe fn(ptr: *const u8, key: &str) -> bool
Check if the map contains a key
get_value_ptr: unsafe fn(ptr: *const u8, key: &str) -> *const u8
Get pointer to a value for a given key, returns null if not found
iter: unsafe fn(ptr: *const u8) -> *const u8
Get an iterator over the map
iter_vtable: MapIterVTable
Virtual table for map iterator operations
Trait Implementations§
impl Copy for MapVTable
impl Eq for MapVTable
impl StructuralPartialEq for MapVTable
Auto Trait Implementations§
impl Freeze for MapVTable
impl RefUnwindSafe for MapVTable
impl Send for MapVTable
impl Sync for MapVTable
impl Unpin for MapVTable
impl UnwindSafe for MapVTable
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