Struct Memory
#[repr(transparent)]
pub struct Memory { /* private fields */ }
Implementations
impl Memory
fn grow(&self, pages: u32) -> u32The
grow()prototype method of theMemoryobject increases the size of the memory instance by a specified number of WebAssembly pages.Takes the number of pages to grow (64KiB in size) and returns the previous size of memory, in pages.
impl Memory
fn new(descriptor: &Object) -> Result<Memory, JsValue>The
WebAssembly.Memory()constructor creates a newMemoryobject which is a resizableArrayBufferthat holds the raw bytes of memory accessed by a WebAssemblyInstance.A memory created by JavaScript or in WebAssembly code will be accessible and mutable from both JavaScript and WebAssembly.
impl Memory
fn buffer(&self) -> JsValueAn accessor property that returns the buffer contained in the memory.
Trait Implementations
impl AsRef<JsValue> for Memory
fn as_ref(&self) -> &JsValue
impl AsRef<Memory> for Memory
fn as_ref(&self) -> &Memory
impl AsRef<Object> for Memory
fn as_ref(&self) -> &Object
impl Clone for Memory
fn clone(&self) -> Self
impl Debug for Memory
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Deref for Memory
type Target = Object;fn deref(&self) -> &Object
impl Eq for Memory
impl ErasableGeneric for Memory
type Repr = JsValue;
impl From<JsValue> for Memory
fn from(obj: JsValue) -> Self
impl FromWasmAbi for Memory
type Abi = <JsValue as FromWasmAbi>::Abi;unsafe fn from_abi(js: Self::Abi) -> Self
impl IntoJsGeneric for Memory
where
Memory: JsGeneric,
type JsCanon = Memory;fn to_js(self) -> Memory
impl IntoWasmAbi for Memory
type Abi = <JsValue as IntoWasmAbi>::Abi;fn into_abi(self) -> Self::Abi
impl JsCast for Memory
fn instanceof(val: &JsValue) -> boolfn unchecked_from_js(val: JsValue) -> Selffn unchecked_from_js_ref(val: &JsValue) -> &Self
impl LongRefFromWasmAbi for Memory
type Abi = <JsValue as LongRefFromWasmAbi>::Abi;type Anchor = Memory;unsafe fn long_ref_from_abi(js: Self::Abi) -> Self::Anchor
impl OptionFromWasmAbi for Memory
fn is_none(abi: &Self::Abi) -> bool
impl OptionIntoWasmAbi for Memory
fn none() -> Self::Abi
impl PartialEq for Memory
fn eq(&self, other: &Self) -> bool
impl Promising for Memory
type Resolution = Memory;
impl RefFromWasmAbi for Memory
type Abi = <JsValue as RefFromWasmAbi>::Abi;type Anchor = ManuallyDrop<Memory>;unsafe fn ref_from_abi(js: Self::Abi) -> Self::Anchor
impl StructuralPartialEq for Memory
impl UpcastFrom<Memory> for Memory
impl WasmDescribe for Memory
fn describe()