pub struct TableRef(_);
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
sourceimpl Deref for TableRef
impl Deref for TableRef
type Target = TableInstance
type Target = TableInstance
The resulting type after dereferencing.
sourcefn deref(&self) -> &TableInstance
fn deref(&self) -> &TableInstance
Dereferences the value.
Auto Trait Implementations
impl !RefUnwindSafe for TableRef
impl !Send for TableRef
impl !Sync for TableRef
impl Unpin for TableRef
impl !UnwindSafe for TableRef
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more