Struct SharedArrayBuffer

#[repr(transparent)]
pub struct SharedArrayBuffer { /* private fields */ }

Implementations

impl SharedArrayBuffer

fn new(length: u32) -> SharedArrayBuffer

The SharedArrayBuffer object is used to represent a generic, fixed-length raw binary data buffer, similar to the ArrayBuffer object, but in a way that they can be used to create views on shared memory. Unlike an ArrayBuffer, a SharedArrayBuffer cannot become detached.

MDN documentation

impl SharedArrayBuffer

fn growable(&self) -> bool

The growable accessor property of SharedArrayBuffer instances returns whether this SharedArrayBuffer can be grown or not.

MDN documentation

impl SharedArrayBuffer

fn slice(&self, begin: u32) -> SharedArrayBuffer

The slice() method returns a new SharedArrayBuffer whose contents are a copy of this SharedArrayBuffer's bytes from begin, inclusive, up to end, exclusive.

MDN documentation

impl SharedArrayBuffer

fn new_with_options(length: usize, options: &ArrayBufferOptions) -> SharedArrayBuffer

The SharedArrayBuffer object is used to represent a generic, fixed-length raw binary data buffer, similar to the ArrayBuffer object, but in a way that they can be used to create views on shared memory. Unlike an ArrayBuffer, a SharedArrayBuffer cannot become detached.

MDN documentation

impl SharedArrayBuffer

fn grow(&self, new_byte_length: usize) -> Result<(), JsValue>

The grow() method of SharedArrayBuffer instances grows the SharedArrayBuffer to the specified size, in bytes.

MDN documentation

impl SharedArrayBuffer

fn slice_from(&self, begin: isize) -> SharedArrayBuffer

The slice() method returns a new SharedArrayBuffer whose contents are a copy of this SharedArrayBuffer's bytes from begin, inclusive, up to end, exclusive.

MDN documentation

impl SharedArrayBuffer

fn byte_length(&self) -> u32

The byteLength accessor property represents the length of an SharedArrayBuffer in bytes. This is established when the SharedArrayBuffer is constructed and cannot be changed.

MDN documentation

impl SharedArrayBuffer

fn max_byte_length(&self) -> usize

The maxByteLength accessor property of SharedArrayBuffer instances returns the maximum length (in bytes) that this SharedArrayBuffer can be resized to.

MDN documentation

impl SharedArrayBuffer

fn slice_with_end(&self, begin: u32, end: u32) -> SharedArrayBuffer

Like slice() but with the end argument.

MDN documentation

Trait Implementations

impl AsRef<JsValue> for SharedArrayBuffer

fn as_ref(&self) -> &JsValue

impl AsRef<Object> for SharedArrayBuffer

fn as_ref(&self) -> &Object

impl AsRef<SharedArrayBuffer> for SharedArrayBuffer

fn as_ref(&self) -> &SharedArrayBuffer

impl Clone for SharedArrayBuffer

fn clone(&self) -> Self

impl Debug for SharedArrayBuffer

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl Deref for SharedArrayBuffer

type Target = Object;
fn deref(&self) -> &Object

impl ErasableGeneric for SharedArrayBuffer

type Repr = JsValue;

impl From<JsValue> for SharedArrayBuffer

fn from(obj: JsValue) -> Self

impl FromWasmAbi for SharedArrayBuffer

type Abi = <JsValue as FromWasmAbi>::Abi;
unsafe fn from_abi(js: Self::Abi) -> Self

impl IntoJsGeneric for SharedArrayBuffer where SharedArrayBuffer: JsGeneric,

type JsCanon = SharedArrayBuffer;
fn to_js(self) -> SharedArrayBuffer

impl IntoWasmAbi for SharedArrayBuffer

type Abi = <JsValue as IntoWasmAbi>::Abi;
fn into_abi(self) -> Self::Abi

impl JsCast for SharedArrayBuffer

fn instanceof(val: &JsValue) -> bool
fn unchecked_from_js(val: JsValue) -> Self
fn unchecked_from_js_ref(val: &JsValue) -> &Self

impl LongRefFromWasmAbi for SharedArrayBuffer

type Abi = <JsValue as LongRefFromWasmAbi>::Abi;
type Anchor = SharedArrayBuffer;
unsafe fn long_ref_from_abi(js: Self::Abi) -> Self::Anchor

impl OptionFromWasmAbi for SharedArrayBuffer

fn is_none(abi: &Self::Abi) -> bool

impl OptionIntoWasmAbi for SharedArrayBuffer

fn none() -> Self::Abi

impl Promising for SharedArrayBuffer

type Resolution = SharedArrayBuffer;

impl RefFromWasmAbi for SharedArrayBuffer

type Abi = <JsValue as RefFromWasmAbi>::Abi;
type Anchor = ManuallyDrop<SharedArrayBuffer>;
unsafe fn ref_from_abi(js: Self::Abi) -> Self::Anchor

impl UpcastFrom<SharedArrayBuffer> for SharedArrayBuffer

impl WasmDescribe for SharedArrayBuffer

fn describe()

Auto Trait Implementations

impl Freeze for SharedArrayBuffer

impl RefUnwindSafe for SharedArrayBuffer

impl Send for SharedArrayBuffer

impl Sync for SharedArrayBuffer

impl Unpin for SharedArrayBuffer

impl UnsafeUnpin for SharedArrayBuffer

impl UnwindSafe for SharedArrayBuffer

Blanket Implementations

impl<P, T> Receiver for SharedArrayBuffer where P: Deref<Target = T> + ?Sized, T: ?Sized,

impl<S, T> Upcast<T> for SharedArrayBuffer where T: UpcastFrom<S> + ?Sized, S: ?Sized,

impl<T> Any for SharedArrayBuffer where T: 'static + ?Sized,

impl<T> Borrow<T> for SharedArrayBuffer where T: ?Sized,

impl<T> BorrowMut<T> for SharedArrayBuffer where T: ?Sized,

impl<T> CloneToUninit for SharedArrayBuffer where T: Clone,

impl<T> From<T> for SharedArrayBuffer

impl<T> JsGeneric for SharedArrayBuffer where T: ErasableGeneric<Repr = JsValue> + UpcastFrom<T> + Upcast<JsValue> + JsCast + 'static,

impl<T> ReturnWasmAbi for SharedArrayBuffer where T: IntoWasmAbi,

impl<T> ToOwned for SharedArrayBuffer where T: Clone,

impl<T> TryFromJsValue for SharedArrayBuffer where T: JsCast,

impl<T> VectorFromWasmAbi for SharedArrayBuffer where T: ErasableGeneric<Repr = JsValue> + WasmDescribe,

impl<T> VectorIntoWasmAbi for SharedArrayBuffer where T: ErasableGeneric<Repr = JsValue> + WasmDescribe,

impl<T> VectorRefIntoWasmAbi for SharedArrayBuffer where &'a T: for<'a> Into<JsValue>,

impl<T, U> Into<U> for SharedArrayBuffer where U: From<T>,

impl<T, U> TryFrom<U> for SharedArrayBuffer where U: Into<T>,

impl<T, U> TryInto<U> for SharedArrayBuffer where U: TryFrom<T>,