Movatterモバイル変換


[0]ホーム

URL:


Docs.rs

JsSharedArrayBuffer

StructJsSharedArrayBuffer 

Source
pub struct JsSharedArrayBuffer {/* private fields */ }
Expand description

JsSharedArrayBuffer provides a wrapper for Boa’s implementation of the ECMAScriptArrayBuffer object

Implementations§

Source§

implJsSharedArrayBuffer

Source

pub fnnew(byte_length:usize, context: &mutContext) ->JsResult<Self>

Creates a newJsSharedArrayBuffer withbyte_length bytes of allocated space.

Source

pub fnfrom_buffer(buffer:SharedArrayBuffer, context: &mutContext) -> Self

Creates aJsSharedArrayBuffer from a shared raw buffer.

Source

pub fnfrom_object(object:JsObject) ->JsResult<Self>

Creates aJsSharedArrayBuffer from aJsObject, throwing aTypeError if the objectis not a shared array buffer.

This does not clone the fields of the shared array buffer, it only does a shallow clone ofthe object.

Source

pub fnbyte_length(&self) ->usize

Returns the byte length of the array buffer.

Source

pub fninner(&self) ->SharedArrayBuffer

Gets the raw buffer of thisJsSharedArrayBuffer.

Methods fromDeref<Target =JsObject<SharedArrayBuffer>>§

Source

pub fndowncast_ref<T:NativeObject>(&self) ->Option<Ref<'_, T>>

Downcasts a reference to the object,if the object is of typeT.

§Panics

Panics if the object is currently mutably borrowed.

Source

pub fndowncast_mut<T:NativeObject>(&self) ->Option<RefMut<'_, T>>

Downcasts a mutable reference to the object,if the object is type native object typeT.

§Panics

Panics if the object is currently borrowed.

Source

pub fnis<T:NativeObject>(&self) ->bool

Checks if this object is an instance of a certainNativeObject.

§Panics

Panics if the object is currently mutably borrowed.

Source

pub fnis_ordinary(&self) ->bool

Checks if it’s an ordinary object.

§Panics

Panics if the object is currently mutably borrowed.

Source

pub fnis_array(&self) ->bool

Checks if it’s anArray object.

Source

pub fnto_property_descriptor( &self, context: &mutContext,) ->JsResult<PropertyDescriptor>

The abstract operationToPropertyDescriptor.

More information:

Source

pub fncopy_data_properties<K>( &self, source: &JsValue, excluded_keys:Vec<K>, context: &mutContext,) ->JsResult<()>
where K:Into<PropertyKey>,

7.3.25 CopyDataProperties ( target, source, excludedItems )

More information:

Source

pub fnborrow(&self) ->Ref<'_,Object<T>>

Immutably borrows theObject.

The borrow lasts until the returnedRef exits scope.Multiple immutable borrows can be taken out at the same time.

§Panics

Panics if the object is currently mutably borrowed.

Source

pub fnborrow_mut(&self) ->RefMut<'_,Object<T>>

Mutably borrows the Object.

The borrow lasts until the returnedRefMut exits scope.The object cannot be borrowed while this borrow is active.

§Panics

Panics if the object is currently borrowed.

Source

pub fntry_borrow(&self) ->StdResult<Ref<'_,Object<T>>,BorrowError>

Immutably borrows theObject, returning an error if the value is currently mutably borrowed.

The borrow lasts until the returnedGcCellRef exits scope.Multiple immutable borrows can be taken out at the same time.

This is the non-panicking variant ofborrow.

Source

pub fntry_borrow_mut(&self) ->StdResult<RefMut<'_,Object<T>>,BorrowMutError>

Mutably borrows the object, returning an error if the value is currently borrowed.

The borrow lasts until the returnedGcCellRefMut exits scope.The object be borrowed while this borrow is active.

This is the non-panicking variant ofborrow_mut.

Source

pub fnprototype(&self) ->JsPrototype

Get the prototype of the object.

§Panics

Panics if the object is currently mutably borrowed.

Source

pub fnset_prototype(&self, prototype:JsPrototype) ->bool

Set the prototype of the object.

§Panics

Panics if the object is currently mutably borrowed

Source

pub fninsert_property<K, P>(&self, key: K, property: P) ->bool

Inserts a field in the objectproperties without checking if it’s writable.

If a field was already in the object with the same name, thantrue is returnedwith that field, otherwisefalse is returned.

Source

pub fnis_callable(&self) ->bool

It determines if Object is a callable function with a[[Call]] internal method.

More information:

Source

pub fnis_constructor(&self) ->bool

It determines if Object is a function object with a[[Construct]] internal method.

More information:

Source

pub fnis_extensible(&self, context: &mutContext) ->JsResult<bool>

Check if object is extensible.

More information:

Source

pub fnget<K>(&self, key: K, context: &mutContext) ->JsResult<JsValue>
where K:Into<PropertyKey>,

Get property from object or throw.

More information:

Source

pub fnset<K, V>( &self, key: K, value: V, throw:bool, context: &mutContext,) ->JsResult<bool>

set property of object or throw if bool flag is passed.

More information:

Source

pub fncreate_data_property<K, V>( &self, key: K, value: V, context: &mutContext,) ->JsResult<bool>

Create data property

More information:

Source

pub fncreate_data_property_or_throw<K, V>( &self, key: K, value: V, context: &mutContext,) ->JsResult<bool>

Create data property or throw

More information:

Source

pub fndefine_property_or_throw<K, P>( &self, key: K, desc: P, context: &mutContext,) ->JsResult<bool>

Define property or throw.

More information:

Source

pub fndelete_property_or_throw<K>( &self, key: K, context: &mutContext,) ->JsResult<bool>
where K:Into<PropertyKey>,

Defines the property or throws aTypeError if the operation fails.

More information:

Source

pub fnhas_property<K>(&self, key: K, context: &mutContext) ->JsResult<bool>
where K:Into<PropertyKey>,

Check if object has property.

More information:

Source

pub fnhas_own_property<K>( &self, key: K, context: &mutContext,) ->JsResult<bool>
where K:Into<PropertyKey>,

Check if object has an own property.

More information:

Source

pub fnown_property_keys( &self, context: &mutContext,) ->JsResult<Vec<PropertyKey>>

Get all the keys of the properties of this object.

More information:

Source

pub fncall( &self, this: &JsValue, args: &[JsValue], context: &mutContext,) ->JsResult<JsValue>

Call ( F, V [ , argumentsList ] )

§Panics

Panics if the object is currently mutably borrowed.

More information:

Source

pub fnconstruct( &self, args: &[JsValue], new_target:Option<&Self>, context: &mutContext,) ->JsResult<Self>

Construct ( F [ , argumentsList [ , newTarget ] ] )

Construct an instance of this object with the specified arguments.

§Panics

Panics if the object is currently mutably borrowed.

More information:

Source

pub fnset_integrity_level( &self, level:IntegrityLevel, context: &mutContext,) ->JsResult<bool>

Make the objectsealed orfrozen.

More information:

Source

pub fntest_integrity_level( &self, level:IntegrityLevel, context: &mutContext,) ->JsResult<bool>

Check if the object issealed orfrozen.

More information:

Trait Implementations§

Source§

implClone forJsSharedArrayBuffer

Source§

fnclone(&self) ->JsSharedArrayBuffer

Returns a duplicate of the value.Read more
1.0.0 ·Source§

fnclone_from(&mut self, source: &Self)

Performs copy-assignment fromsource.Read more
Source§

implDebug forJsSharedArrayBuffer

Source§

fnfmt(&self, f: &mutFormatter<'_>) ->Result

Formats the value using the given formatter.Read more
Source§

implDeref forJsSharedArrayBuffer

Source§

typeTarget =JsObject<SharedArrayBuffer>

The resulting type after dereferencing.
Source§

fnderef(&self) -> &Self::Target

Dereferences the value.
Source§

implFinalize forJsSharedArrayBuffer

Source§

fnfinalize(&self)

Cleanup logic for a type.
Source§

implFrom<JsObject<SharedArrayBuffer>> forJsSharedArrayBuffer

Source§

fnfrom(value:JsObject<SharedArrayBuffer>) -> Self

Converts to this type from the input type.
Source§

implFrom<JsSharedArrayBuffer> forJsObject

Source§

fnfrom(o:JsSharedArrayBuffer) -> Self

Converts to this type from the input type.
Source§

implFrom<JsSharedArrayBuffer> forJsObject<SharedArrayBuffer>

Source§

fnfrom(value:JsSharedArrayBuffer) -> Self

Converts to this type from the input type.
Source§

implFrom<JsSharedArrayBuffer> forJsValue

Source§

fnfrom(o:JsSharedArrayBuffer) -> Self

Converts to this type from the input type.
Source§

implTrace forJsSharedArrayBuffer

Source§

unsafe fntrace(&self, tracer: &mut Tracer)

Marks all containedGcs.Read more
Source§

unsafe fntrace_non_roots(&self)

Trace handles located in GC heap, and mark them as non root.Read more
Source§

fnrun_finalizer(&self)

RunsFinalize::finalize on this object and allcontained subobjects.
Source§

implTryFromJs forJsSharedArrayBuffer

Source§

fntry_from_js(value: &JsValue, _context: &mutContext) ->JsResult<Self>

This function tries to convert a JavaScript value intoSelf.
Source§

implTryIntoJs forJsSharedArrayBuffer

Source§

fntry_into_js(&self, _context: &mutContext) ->JsResult<JsValue>

This function tries to convert aSelf intoJsValue.

Auto Trait Implementations§

§

implFreeze forJsSharedArrayBuffer

§

impl !RefUnwindSafe forJsSharedArrayBuffer

§

impl !Send forJsSharedArrayBuffer

§

impl !Sync forJsSharedArrayBuffer

§

implUnpin forJsSharedArrayBuffer

§

impl !UnwindSafe forJsSharedArrayBuffer

Blanket Implementations§

Source§

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

Source§

fntype_id(&self) ->TypeId

Gets theTypeId ofself.Read more
Source§

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

Source§

fnborrow(&self) ->&T

Immutably borrows from an owned value.Read more
Source§

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

Source§

fnborrow_mut(&mut self) ->&mut T

Mutably borrows from an owned value.Read more
Source§

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

Source§

unsafe fnclone_to_uninit(&self, dest:*mutu8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment fromself todest.Read more
Source§

impl<T>Conv for T

Source§

fnconv<T>(self) -> T
where Self:Into<T>,

Convertsself intoT usingInto<T>.Read more
Source§

impl<T>From<T> for T

Source§

fnfrom(t: T) -> T

Returns the argument unchanged.

Source§

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

Source§

fninto(self) -> U

CallsU::from(self).

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

Source§

impl<T>IntoEither for T

Source§

fninto_either(self, into_left:bool) ->Either<Self, Self>

Convertsself into aLeft variant ofEither<Self, Self>ifinto_left istrue.Convertsself into aRight variant ofEither<Self, Self>otherwise.Read more
Source§

fninto_either_with<F>(self, into_left: F) ->Either<Self, Self>
where F:FnOnce(&Self) ->bool,

Convertsself into aLeft variant ofEither<Self, Self>ifinto_left(&self) returnstrue.Convertsself into aRight variant ofEither<Self, Self>otherwise.Read more
Source§

impl<T>Pipe for T
where T: ?Sized,

Source§

fnpipe<R>(self, func: implFnOnce(Self) -> R) -> R
where Self:Sized,

Pipes by value. This is generally the method you want to use.Read more
Source§

fnpipe_ref<'a, R>(&'a self, func: implFnOnce(&'a Self) -> R) -> R
where R: 'a,

Borrowsself and passes that borrow into the pipe function.Read more
Source§

fnpipe_ref_mut<'a, R>(&'a mut self, func: implFnOnce(&'a mut Self) -> R) -> R
where R: 'a,

Mutably borrowsself and passes that borrow into the pipe function.Read more
Source§

fnpipe_borrow<'a, B, R>(&'a self, func: implFnOnce(&'a B) -> R) -> R
where Self:Borrow<B>, B: 'a + ?Sized, R: 'a,

Borrowsself, then passesself.borrow() into the pipe function.Read more
Source§

fnpipe_borrow_mut<'a, B, R>( &'a mut self, func: implFnOnce(&'a mut B) -> R,) -> R
where Self:BorrowMut<B>, B: 'a + ?Sized, R: 'a,

Mutably borrowsself, then passesself.borrow_mut() into the pipefunction.Read more
Source§

fnpipe_as_ref<'a, U, R>(&'a self, func: implFnOnce(&'a U) -> R) -> R
where Self:AsRef<U>, U: 'a + ?Sized, R: 'a,

Borrowsself, then passesself.as_ref() into the pipe function.
Source§

fnpipe_as_mut<'a, U, R>(&'a mut self, func: implFnOnce(&'a mut U) -> R) -> R
where Self:AsMut<U>, U: 'a + ?Sized, R: 'a,

Mutably borrowsself, then passesself.as_mut() into the pipefunction.
Source§

fnpipe_deref<'a, T, R>(&'a self, func: implFnOnce(&'a T) -> R) -> R
where Self:Deref<Target = T>, T: 'a + ?Sized, R: 'a,

Borrowsself, then passesself.deref() into the pipe function.
Source§

fnpipe_deref_mut<'a, T, R>( &'a mut self, func: implFnOnce(&'a mut T) -> R,) -> R
where Self:DerefMut<Target = T> +Deref, T: 'a + ?Sized, R: 'a,

Mutably borrowsself, then passesself.deref_mut() into the pipefunction.
Source§

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

Source§

typeTarget = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T>Tap for T

Source§

fntap(self, func: implFnOnce(&Self)) -> Self

Immutable access to a value.Read more
Source§

fntap_mut(self, func: implFnOnce(&mut Self)) -> Self

Mutable access to a value.Read more
Source§

fntap_borrow<B>(self, func: implFnOnce(&B)) -> Self
where Self:Borrow<B>, B: ?Sized,

Immutable access to theBorrow<B> of a value.Read more
Source§

fntap_borrow_mut<B>(self, func: implFnOnce(&mut B)) -> Self
where Self:BorrowMut<B>, B: ?Sized,

Mutable access to theBorrowMut<B> of a value.Read more
Source§

fntap_ref<R>(self, func: implFnOnce(&R)) -> Self
where Self:AsRef<R>, R: ?Sized,

Immutable access to theAsRef<R> view of a value.Read more
Source§

fntap_ref_mut<R>(self, func: implFnOnce(&mut R)) -> Self
where Self:AsMut<R>, R: ?Sized,

Mutable access to theAsMut<R> view of a value.Read more
Source§

fntap_deref<T>(self, func: implFnOnce(&T)) -> Self
where Self:Deref<Target = T>, T: ?Sized,

Immutable access to theDeref::Target of a value.Read more
Source§

fntap_deref_mut<T>(self, func: implFnOnce(&mut T)) -> Self
where Self:DerefMut<Target = T> +Deref, T: ?Sized,

Mutable access to theDeref::Target of a value.Read more
Source§

fntap_dbg(self, func: implFnOnce(&Self)) -> Self

Calls.tap() only in debug builds, and is erased in release builds.
Source§

fntap_mut_dbg(self, func: implFnOnce(&mut Self)) -> Self

Calls.tap_mut() only in debug builds, and is erased in releasebuilds.
Source§

fntap_borrow_dbg<B>(self, func: implFnOnce(&B)) -> Self
where Self:Borrow<B>, B: ?Sized,

Calls.tap_borrow() only in debug builds, and is erased in releasebuilds.
Source§

fntap_borrow_mut_dbg<B>(self, func: implFnOnce(&mut B)) -> Self
where Self:BorrowMut<B>, B: ?Sized,

Calls.tap_borrow_mut() only in debug builds, and is erased in releasebuilds.
Source§

fntap_ref_dbg<R>(self, func: implFnOnce(&R)) -> Self
where Self:AsRef<R>, R: ?Sized,

Calls.tap_ref() only in debug builds, and is erased in releasebuilds.
Source§

fntap_ref_mut_dbg<R>(self, func: implFnOnce(&mut R)) -> Self
where Self:AsMut<R>, R: ?Sized,

Calls.tap_ref_mut() only in debug builds, and is erased in releasebuilds.
Source§

fntap_deref_dbg<T>(self, func: implFnOnce(&T)) -> Self
where Self:Deref<Target = T>, T: ?Sized,

Calls.tap_deref() only in debug builds, and is erased in releasebuilds.
Source§

fntap_deref_mut_dbg<T>(self, func: implFnOnce(&mut T)) -> Self
where Self:DerefMut<Target = T> +Deref, T: ?Sized,

Calls.tap_deref_mut() only in debug builds, and is erased in releasebuilds.
Source§

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

Source§

typeOwned = T

The resulting type after obtaining ownership.
Source§

fnto_owned(&self) -> T

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

fnclone_into(&self, target:&mut T)

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

impl<T>TryConv for T

Source§

fntry_conv<T>(self) ->Result<T, Self::Error>
where Self:TryInto<T>,

Attempts to convertself intoT usingTryInto<T>.Read more
Source§

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

Source§

typeError =Infallible

The type returned in the event of a conversion error.
Source§

fntry_from(value: U) ->Result<T, <T asTryFrom<U>>::Error>

Performs the conversion.
Source§

impl<'a, T>TryFromJsArgument<'a> for T
where T:TryFromJs,

Source§

fntry_from_js_argument( _: &'aJsValue, rest: &'a [JsValue], context: &mutContext,) ->Result<(T, &'a [JsValue]),JsError>

Try to convert a JS argument into a Rust value, returning thevalue and the rest of the arguments to be parsed.Read more
Source§

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

Source§

typeError = <U asTryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fntry_into(self) ->Result<U, <U asTryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T>TryIntoJsResult for T
where T:TryIntoJs,

Source§

fntry_into_js_result(self, ctx: &mutContext) ->Result<JsValue,JsError>

Try to convert a Rust value into aJsResult<JsValue>.Read more
Source§

impl<V, T>VZip<V> for T
where V:MultiLane<T>,

Source§

fnvzip(self) -> V

Source§

impl<T>ErasedDestructor for T
where T: 'static,


[8]ページ先頭

©2009-2025 Movatter.jp