pub struct TableRef(/* private fields */);
Expand description
Reference to a table (See TableInstance
for details).
This reference has a reference-counting semantics.
Methods from Deref<Target = TableInstance>§
Sourcepub fn initial_size(&self) -> u32
pub fn initial_size(&self) -> u32
Returns size this table was created with.
Sourcepub fn maximum_size(&self) -> Option<u32>
pub fn maximum_size(&self) -> Option<u32>
Returns maximum size TableInstance
can grow to.
Sourcepub fn current_size(&self) -> u32
pub fn current_size(&self) -> u32
Returns current size of the table.
Sourcepub fn grow(&self, by: u32) -> Result<(), Error>
pub fn grow(&self, by: u32) -> Result<(), Error>
Increases the size of the table by given number of elements.
§Errors
Returns Err
if tried to allocate more elements than permited by limit.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TableRef
impl !RefUnwindSafe for TableRef
impl !Send for TableRef
impl !Sync for TableRef
impl Unpin for TableRef
impl !UnwindSafe for TableRef
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