pub struct SharedMemory(_);
Expand description

For shared memory (and only for shared memory), this lock-version restricts access when growing the memory or checking its size. This is to conform with the thread proposal: “When IsSharedArrayBuffer(...) is true, the return value should be the result of an atomic read-modify-write of the new size to the internal length slot.”

Implementations

Construct a new SharedMemory.

Wrap an existing Memory with the locking provided by a SharedMemory.

Return the memory type for this SharedMemory.

Convert this shared memory into a Memory.

Return a mutable pointer to the shared memory’s VMMemoryDefinition.

Return a pointer to the shared memory’s VMMemoryDefinition.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Proxy all calls through the RwLock.

Returns the number of allocated bytes.

Returns the maximum number of bytes the memory can grow to. Returns None if the memory is unbounded. Read more

Grows a memory by delta_pages. Read more

Grow memory to the specified amount of bytes. Read more

Return a VMMemoryDefinition for exposing the memory to compiled wasm code. Read more

Does this memory need initialization? It may not if it already has initial contents courtesy of the MemoryImage passed to RuntimeMemoryCreator::new_memory(). Read more

For the pooling allocator, we must be able to downcast this trait to its underlying structure. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.