pub struct TableType { /* private fields */ }Expand description
Table types classify tables over elements of reference type within a size range. Like memories, tables are constrained by limits for their minimum and optionally maximum size. The limits are given in numbers of entries.
See https://webassembly.github.io/spec/core/syntax/types.html#table-types
§Examples
use wasm_ast::{Limit, TableType, ReferenceType};
let limit = Limit::unbounded(0);
let table_type = TableType::new( ReferenceType::External,limit.clone());
assert_eq!(table_type.limits(), &limit);
assert_eq!(table_type.kind(), ReferenceType::External);Implementations§
Source§impl TableType
impl TableType
Sourcepub fn new(kind: ReferenceType, limits: Limit) -> Self
pub fn new(kind: ReferenceType, limits: Limit) -> Self
Creates a new TableType for the given limits and reference type.
Sourcepub fn kind(&self) -> ReferenceType
pub fn kind(&self) -> ReferenceType
The reference type of the elements of this TableType.
Trait Implementations§
impl Copy for TableType
impl Eq for TableType
impl StructuralPartialEq for TableType
Auto Trait Implementations§
impl Freeze for TableType
impl RefUnwindSafe for TableType
impl Send for TableType
impl Sync for TableType
impl Unpin for TableType
impl UnwindSafe for TableType
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