pub struct NativeTable { /* private fields */ }Expand description
Immutable, indexable set of natives. Gaps left by NativeTableBuilder::register_at
are None — calling them faults with Fault::BadNative.
Implementations§
Source§impl NativeTable
impl NativeTable
pub fn builder() -> NativeTableBuilder
Sourcepub fn empty() -> Arc<NativeTable> ⓘ
pub fn empty() -> Arc<NativeTable> ⓘ
Empty table — valid for chunks that never emit CallNative.
pub fn get(&self, index: u32) -> Option<&NativeFn>
pub fn index_of(&self, name: &str) -> Option<u32>
Sourcepub fn len(&self) -> usize
pub fn len(&self) -> usize
Slot count including reserved-but-empty gaps (one past the highest touched index), not the count of registered functions.
pub fn is_empty(&self) -> bool
pub fn names(&self) -> impl Iterator<Item = &str>
Auto Trait Implementations§
impl !RefUnwindSafe for NativeTable
impl !UnwindSafe for NativeTable
impl Freeze for NativeTable
impl Send for NativeTable
impl Sync for NativeTable
impl Unpin for NativeTable
impl UnsafeUnpin for NativeTable
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