pub struct NativeTableBuilder { /* private fields */ }Expand description
Fluent builder for a NativeTable.
Self::register— next sequential slot (host builds table + chunk together).Self::register_at— fixed ABI slot (MCU / separately flashed bytecode).
Implementations§
Source§impl NativeTableBuilder
impl NativeTableBuilder
pub fn new() -> Self
Sourcepub fn register<F>(
self,
name: impl Into<String>,
f: F,
) -> Result<Self, NativeTableError>
pub fn register<F>( self, name: impl Into<String>, f: F, ) -> Result<Self, NativeTableError>
Register f under name at the next sequential slot.
Sourcepub fn register_at<F>(
self,
index: u32,
name: impl Into<String>,
f: F,
) -> Result<Self, NativeTableError>
pub fn register_at<F>( self, index: u32, name: impl Into<String>, f: F, ) -> Result<Self, NativeTableError>
Register f under name at explicit index, padding lower gaps as
unregistered (get → None → Fault::BadNative).
pub fn build(self) -> Arc<NativeTable> ⓘ
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for NativeTableBuilder
impl !UnwindSafe for NativeTableBuilder
impl Freeze for NativeTableBuilder
impl Send for NativeTableBuilder
impl Sync for NativeTableBuilder
impl Unpin for NativeTableBuilder
impl UnsafeUnpin for NativeTableBuilder
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