Struct SharedArrayBuffer
#[repr(transparent)]
pub struct SharedArrayBuffer { /* private fields */ }
Implementations
impl SharedArrayBuffer
fn new(length: u32) -> SharedArrayBufferThe
SharedArrayBufferobject is used to represent a generic, fixed-length raw binary data buffer, similar to theArrayBufferobject, but in a way that they can be used to create views on shared memory. Unlike anArrayBuffer, aSharedArrayBuffercannot become detached.
impl SharedArrayBuffer
fn growable(&self) -> boolThe
growableaccessor property ofSharedArrayBufferinstances returns whether thisSharedArrayBuffercan be grown or not.
impl SharedArrayBuffer
fn slice(&self, begin: u32) -> SharedArrayBufferThe
slice()method returns a newSharedArrayBufferwhose contents are a copy of thisSharedArrayBuffer's bytes from begin, inclusive, up to end, exclusive.
impl SharedArrayBuffer
fn new_with_options(length: usize, options: &ArrayBufferOptions) -> SharedArrayBufferThe
SharedArrayBufferobject is used to represent a generic, fixed-length raw binary data buffer, similar to theArrayBufferobject, but in a way that they can be used to create views on shared memory. Unlike anArrayBuffer, aSharedArrayBuffercannot become detached.
impl SharedArrayBuffer
fn grow(&self, new_byte_length: usize) -> Result<(), JsValue>The
grow()method ofSharedArrayBufferinstances grows theSharedArrayBufferto the specified size, in bytes.
impl SharedArrayBuffer
fn slice_from(&self, begin: isize) -> SharedArrayBufferThe
slice()method returns a newSharedArrayBufferwhose contents are a copy of thisSharedArrayBuffer's bytes from begin, inclusive, up to end, exclusive.
impl SharedArrayBuffer
fn byte_length(&self) -> u32The
byteLengthaccessor property represents the length of anSharedArrayBufferin bytes. This is established when theSharedArrayBufferis constructed and cannot be changed.
impl SharedArrayBuffer
fn max_byte_length(&self) -> usizeThe
maxByteLengthaccessor property ofSharedArrayBufferinstances returns the maximum length (in bytes) that thisSharedArrayBuffercan be resized to.
impl SharedArrayBuffer
fn slice_with_end(&self, begin: u32, end: u32) -> SharedArrayBufferLike
slice()but with theendargument.
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) -> boolfn unchecked_from_js(val: JsValue) -> Selffn 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()