pub struct InstantiatedSectionSizes { /* private fields */ }Expand description
Instantiated section sizes for charging during module instantiation. By “instantiated sections sizes” we mean the size of the section representation in the executor during module instantiation.
Implementations§
Source§impl InstantiatedSectionSizes
impl InstantiatedSectionSizes
Sourcepub fn new(
code_section: u32,
data_section: u32,
global_section: u32,
table_section: u32,
element_section: u32,
type_section: u32,
) -> Self
pub fn new( code_section: u32, data_section: u32, global_section: u32, table_section: u32, element_section: u32, type_section: u32, ) -> Self
Creates a new instance of the section sizes.
Sourcepub fn code_section(&self) -> u32
pub fn code_section(&self) -> u32
Returns the code section size in bytes.
Sourcepub fn data_section(&self) -> u32
pub fn data_section(&self) -> u32
Returns the data section size in bytes.
Sourcepub fn global_section(&self) -> u32
pub fn global_section(&self) -> u32
Returns the global section size in bytes.
Sourcepub fn table_section(&self) -> u32
pub fn table_section(&self) -> u32
Returns the table section size in bytes.
Sourcepub fn element_section(&self) -> u32
pub fn element_section(&self) -> u32
Returns the element section size in bytes.
Sourcepub fn type_section(&self) -> u32
pub fn type_section(&self) -> u32
Returns the type section size in bytes.
Trait Implementations§
Source§impl Clone for InstantiatedSectionSizes
impl Clone for InstantiatedSectionSizes
Source§fn clone(&self) -> InstantiatedSectionSizes
fn clone(&self) -> InstantiatedSectionSizes
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for InstantiatedSectionSizes
impl Debug for InstantiatedSectionSizes
Source§impl Decode for InstantiatedSectionSizes
impl Decode for InstantiatedSectionSizes
Source§fn decode<__CodecInputEdqy: Input>(
__codec_input_edqy: &mut __CodecInputEdqy,
) -> Result<Self, Error>
fn decode<__CodecInputEdqy: Input>( __codec_input_edqy: &mut __CodecInputEdqy, ) -> Result<Self, Error>
Attempt to deserialise the value from input.
Source§fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>,
) -> Result<DecodeFinished, Error>where
I: Input,
fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>,
) -> Result<DecodeFinished, Error>where
I: Input,
Attempt to deserialize the value from input into a pre-allocated piece of memory. Read more
Source§impl Encode for InstantiatedSectionSizes
impl Encode for InstantiatedSectionSizes
Source§fn size_hint(&self) -> usize
fn size_hint(&self) -> usize
If possible give a hint of expected size of the encoding. Read more
Source§fn encode_to<__CodecOutputEdqy: Output + ?Sized>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)
fn encode_to<__CodecOutputEdqy: Output + ?Sized>( &self, __codec_dest_edqy: &mut __CodecOutputEdqy, )
Convert self to a slice and append it to the destination.
Source§fn using_encoded<R, F>(&self, f: F) -> R
fn using_encoded<R, F>(&self, f: F) -> R
Convert self to a slice and then invoke the given closure with it.
Source§fn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
Calculates the encoded size. Read more
Source§impl Hash for InstantiatedSectionSizes
impl Hash for InstantiatedSectionSizes
Source§impl PartialEq for InstantiatedSectionSizes
impl PartialEq for InstantiatedSectionSizes
Source§impl TypeInfo for InstantiatedSectionSizes
impl TypeInfo for InstantiatedSectionSizes
impl EncodeLike for InstantiatedSectionSizes
impl Eq for InstantiatedSectionSizes
impl StructuralPartialEq for InstantiatedSectionSizes
Auto Trait Implementations§
impl Freeze for InstantiatedSectionSizes
impl RefUnwindSafe for InstantiatedSectionSizes
impl Send for InstantiatedSectionSizes
impl Sync for InstantiatedSectionSizes
impl Unpin for InstantiatedSectionSizes
impl UnwindSafe for InstantiatedSectionSizes
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