pub(crate) struct RootedTraceableBox<T>(RootedTraceableBox<T>)
where
T: Traceable + 'static;Expand description
Roots any JSTraceable thing
If you have a valid DomObject, use DomRoot. If you have GC things like *mut JSObject or JSVal, use rooted!. If you have an arbitrary number of DomObjects to root, use rooted_vec!. If you know what you’re doing, use this.
Tuple Fields§
§0: RootedTraceableBox<T>Implementations§
Source§impl<T> RootedTraceableBox<T>where
T: Traceable + 'static,
impl<T> RootedTraceableBox<T>where
T: Traceable + 'static,
Sourcepub fn new(traceable: T) -> RootedTraceableBox<T>
pub fn new(traceable: T) -> RootedTraceableBox<T>
DomRoot a JSTraceable thing for the life of this RootedTraceableBox
Sourcepub fn from_box(boxed_traceable: Box<T>) -> RootedTraceableBox<T>
pub fn from_box(boxed_traceable: Box<T>) -> RootedTraceableBox<T>
Consumes a boxed JSTraceable and roots it for the life of this RootedTraceableBox.
Trait Implementations§
Source§impl<T> Default for RootedTraceableBox<T>
impl<T> Default for RootedTraceableBox<T>
Source§fn default() -> RootedTraceableBox<T>
fn default() -> RootedTraceableBox<T>
Returns the “default value” for a type. Read more
Source§impl<T> Deref for RootedTraceableBox<T>where
T: Traceable,
impl<T> Deref for RootedTraceableBox<T>where
T: Traceable,
Source§impl<T> DerefMut for RootedTraceableBox<T>where
T: Traceable,
impl<T> DerefMut for RootedTraceableBox<T>where
T: Traceable,
Source§impl From<RootedTraceableBox<AesCbcParams>> for SubtleAesCbcParams
impl From<RootedTraceableBox<AesCbcParams>> for SubtleAesCbcParams
Source§fn from(params: RootedTraceableBox<AesCbcParams>) -> Self
fn from(params: RootedTraceableBox<AesCbcParams>) -> Self
Converts to this type from the input type.
Source§impl From<RootedTraceableBox<AesCtrParams>> for SubtleAesCtrParams
impl From<RootedTraceableBox<AesCtrParams>> for SubtleAesCtrParams
Source§fn from(params: RootedTraceableBox<AesCtrParams>) -> Self
fn from(params: RootedTraceableBox<AesCtrParams>) -> Self
Converts to this type from the input type.
Source§impl From<RootedTraceableBox<AesGcmParams>> for SubtleAesGcmParams
impl From<RootedTraceableBox<AesGcmParams>> for SubtleAesGcmParams
Source§fn from(params: RootedTraceableBox<AesGcmParams>) -> Self
fn from(params: RootedTraceableBox<AesGcmParams>) -> Self
Converts to this type from the input type.
Source§impl FromJSValConvertible for RootedTraceableBox<AesCbcParams>
impl FromJSValConvertible for RootedTraceableBox<AesCbcParams>
Source§unsafe fn from_jsval(
cx: *mut JSContext,
value: Handle<'_, Value>,
_option: (),
) -> Result<ConversionResult<RootedTraceableBox<AesCbcParams>>, ()>
unsafe fn from_jsval( cx: *mut JSContext, value: Handle<'_, Value>, _option: (), ) -> Result<ConversionResult<RootedTraceableBox<AesCbcParams>>, ()>
Convert
val to type Self.
Optional configuration of type T can be passed as the option
argument.
If it returns Err(()), a JSAPI exception is pending.
If it returns Ok(Failure(reason)), there is no pending JSAPI exception.Source§impl FromJSValConvertible for RootedTraceableBox<AesCtrParams>
impl FromJSValConvertible for RootedTraceableBox<AesCtrParams>
Source§unsafe fn from_jsval(
cx: *mut JSContext,
value: Handle<'_, Value>,
_option: (),
) -> Result<ConversionResult<RootedTraceableBox<AesCtrParams>>, ()>
unsafe fn from_jsval( cx: *mut JSContext, value: Handle<'_, Value>, _option: (), ) -> Result<ConversionResult<RootedTraceableBox<AesCtrParams>>, ()>
Convert
val to type Self.
Optional configuration of type T can be passed as the option
argument.
If it returns Err(()), a JSAPI exception is pending.
If it returns Ok(Failure(reason)), there is no pending JSAPI exception.Source§impl FromJSValConvertible for RootedTraceableBox<AesGcmParams>
impl FromJSValConvertible for RootedTraceableBox<AesGcmParams>
Source§unsafe fn from_jsval(
cx: *mut JSContext,
value: Handle<'_, Value>,
_option: (),
) -> Result<ConversionResult<RootedTraceableBox<AesGcmParams>>, ()>
unsafe fn from_jsval( cx: *mut JSContext, value: Handle<'_, Value>, _option: (), ) -> Result<ConversionResult<RootedTraceableBox<AesGcmParams>>, ()>
Convert
val to type Self.
Optional configuration of type T can be passed as the option
argument.
If it returns Err(()), a JSAPI exception is pending.
If it returns Ok(Failure(reason)), there is no pending JSAPI exception.Source§impl FromJSValConvertible for RootedTraceableBox<BluetoothDataFilterInit>
impl FromJSValConvertible for RootedTraceableBox<BluetoothDataFilterInit>
Source§unsafe fn from_jsval(
cx: *mut JSContext,
value: Handle<'_, Value>,
_option: (),
) -> Result<ConversionResult<RootedTraceableBox<BluetoothDataFilterInit>>, ()>
unsafe fn from_jsval( cx: *mut JSContext, value: Handle<'_, Value>, _option: (), ) -> Result<ConversionResult<RootedTraceableBox<BluetoothDataFilterInit>>, ()>
Convert
val to type Self.
Optional configuration of type T can be passed as the option
argument.
If it returns Err(()), a JSAPI exception is pending.
If it returns Ok(Failure(reason)), there is no pending JSAPI exception.Source§impl FromJSValConvertible for RootedTraceableBox<CustomEventInit>
impl FromJSValConvertible for RootedTraceableBox<CustomEventInit>
Source§unsafe fn from_jsval(
cx: *mut JSContext,
value: Handle<'_, Value>,
_option: (),
) -> Result<ConversionResult<RootedTraceableBox<CustomEventInit>>, ()>
unsafe fn from_jsval( cx: *mut JSContext, value: Handle<'_, Value>, _option: (), ) -> Result<ConversionResult<RootedTraceableBox<CustomEventInit>>, ()>
Convert
val to type Self.
Optional configuration of type T can be passed as the option
argument.
If it returns Err(()), a JSAPI exception is pending.
If it returns Ok(Failure(reason)), there is no pending JSAPI exception.Source§impl<D> FromJSValConvertible for RootedTraceableBox<DeferredRequestInit<D>>where
D: DomTypes,
impl<D> FromJSValConvertible for RootedTraceableBox<DeferredRequestInit<D>>where
D: DomTypes,
Source§unsafe fn from_jsval(
cx: *mut JSContext,
value: Handle<'_, Value>,
_option: (),
) -> Result<ConversionResult<RootedTraceableBox<DeferredRequestInit<D>>>, ()>
unsafe fn from_jsval( cx: *mut JSContext, value: Handle<'_, Value>, _option: (), ) -> Result<ConversionResult<RootedTraceableBox<DeferredRequestInit<D>>>, ()>
Convert
val to type Self.
Optional configuration of type T can be passed as the option
argument.
If it returns Err(()), a JSAPI exception is pending.
If it returns Ok(Failure(reason)), there is no pending JSAPI exception.Source§impl FromJSValConvertible for RootedTraceableBox<ErrorEventInit>
impl FromJSValConvertible for RootedTraceableBox<ErrorEventInit>
Source§unsafe fn from_jsval(
cx: *mut JSContext,
value: Handle<'_, Value>,
_option: (),
) -> Result<ConversionResult<RootedTraceableBox<ErrorEventInit>>, ()>
unsafe fn from_jsval( cx: *mut JSContext, value: Handle<'_, Value>, _option: (), ) -> Result<ConversionResult<RootedTraceableBox<ErrorEventInit>>, ()>
Convert
val to type Self.
Optional configuration of type T can be passed as the option
argument.
If it returns Err(()), a JSAPI exception is pending.
If it returns Ok(Failure(reason)), there is no pending JSAPI exception.Source§impl<D> FromJSValConvertible for RootedTraceableBox<ExtendableMessageEventInit<D>>where
D: DomTypes,
impl<D> FromJSValConvertible for RootedTraceableBox<ExtendableMessageEventInit<D>>where
D: DomTypes,
Source§unsafe fn from_jsval(
cx: *mut JSContext,
value: Handle<'_, Value>,
_option: (),
) -> Result<ConversionResult<RootedTraceableBox<ExtendableMessageEventInit<D>>>, ()>
unsafe fn from_jsval( cx: *mut JSContext, value: Handle<'_, Value>, _option: (), ) -> Result<ConversionResult<RootedTraceableBox<ExtendableMessageEventInit<D>>>, ()>
Convert
val to type Self.
Optional configuration of type T can be passed as the option
argument.
If it returns Err(()), a JSAPI exception is pending.
If it returns Ok(Failure(reason)), there is no pending JSAPI exception.Source§impl FromJSValConvertible for RootedTraceableBox<GPUShaderModuleDescriptor>
impl FromJSValConvertible for RootedTraceableBox<GPUShaderModuleDescriptor>
Source§unsafe fn from_jsval(
cx: *mut JSContext,
value: Handle<'_, Value>,
_option: (),
) -> Result<ConversionResult<RootedTraceableBox<GPUShaderModuleDescriptor>>, ()>
unsafe fn from_jsval( cx: *mut JSContext, value: Handle<'_, Value>, _option: (), ) -> Result<ConversionResult<RootedTraceableBox<GPUShaderModuleDescriptor>>, ()>
Convert
val to type Self.
Optional configuration of type T can be passed as the option
argument.
If it returns Err(()), a JSAPI exception is pending.
If it returns Ok(Failure(reason)), there is no pending JSAPI exception.Source§impl<T> FromJSValConvertible for RootedTraceableBox<Heap<T>>
impl<T> FromJSValConvertible for RootedTraceableBox<Heap<T>>
Source§type Config = <T as FromJSValConvertible>::Config
type Config = <T as FromJSValConvertible>::Config
Optional configurable behaviour switch; use () for no configuration.
Source§unsafe fn from_jsval(
cx: *mut JSContext,
value: Handle<'_, Value>,
config: <RootedTraceableBox<Heap<T>> as FromJSValConvertible>::Config,
) -> Result<ConversionResult<RootedTraceableBox<Heap<T>>>, ()>
unsafe fn from_jsval( cx: *mut JSContext, value: Handle<'_, Value>, config: <RootedTraceableBox<Heap<T>> as FromJSValConvertible>::Config, ) -> Result<ConversionResult<RootedTraceableBox<Heap<T>>>, ()>
Convert
val to type Self.
Optional configuration of type T can be passed as the option
argument.
If it returns Err(()), a JSAPI exception is pending.
If it returns Ok(Failure(reason)), there is no pending JSAPI exception.Source§impl FromJSValConvertible for RootedTraceableBox<HkdfParams>
impl FromJSValConvertible for RootedTraceableBox<HkdfParams>
Source§unsafe fn from_jsval(
cx: *mut JSContext,
value: Handle<'_, Value>,
_option: (),
) -> Result<ConversionResult<RootedTraceableBox<HkdfParams>>, ()>
unsafe fn from_jsval( cx: *mut JSContext, value: Handle<'_, Value>, _option: (), ) -> Result<ConversionResult<RootedTraceableBox<HkdfParams>>, ()>
Convert
val to type Self.
Optional configuration of type T can be passed as the option
argument.
If it returns Err(()), a JSAPI exception is pending.
If it returns Ok(Failure(reason)), there is no pending JSAPI exception.Source§impl FromJSValConvertible for RootedTraceableBox<HmacImportParams>
impl FromJSValConvertible for RootedTraceableBox<HmacImportParams>
Source§unsafe fn from_jsval(
cx: *mut JSContext,
value: Handle<'_, Value>,
_option: (),
) -> Result<ConversionResult<RootedTraceableBox<HmacImportParams>>, ()>
unsafe fn from_jsval( cx: *mut JSContext, value: Handle<'_, Value>, _option: (), ) -> Result<ConversionResult<RootedTraceableBox<HmacImportParams>>, ()>
Convert
val to type Self.
Optional configuration of type T can be passed as the option
argument.
If it returns Err(()), a JSAPI exception is pending.
If it returns Ok(Failure(reason)), there is no pending JSAPI exception.Source§impl FromJSValConvertible for RootedTraceableBox<HmacKeyGenParams>
impl FromJSValConvertible for RootedTraceableBox<HmacKeyGenParams>
Source§unsafe fn from_jsval(
cx: *mut JSContext,
value: Handle<'_, Value>,
_option: (),
) -> Result<ConversionResult<RootedTraceableBox<HmacKeyGenParams>>, ()>
unsafe fn from_jsval( cx: *mut JSContext, value: Handle<'_, Value>, _option: (), ) -> Result<ConversionResult<RootedTraceableBox<HmacKeyGenParams>>, ()>
Convert
val to type Self.
Optional configuration of type T can be passed as the option
argument.
If it returns Err(()), a JSAPI exception is pending.
If it returns Ok(Failure(reason)), there is no pending JSAPI exception.Source§impl FromJSValConvertible for RootedTraceableBox<IterableKeyAndValueResult>
impl FromJSValConvertible for RootedTraceableBox<IterableKeyAndValueResult>
Source§unsafe fn from_jsval(
cx: *mut JSContext,
value: Handle<'_, Value>,
_option: (),
) -> Result<ConversionResult<RootedTraceableBox<IterableKeyAndValueResult>>, ()>
unsafe fn from_jsval( cx: *mut JSContext, value: Handle<'_, Value>, _option: (), ) -> Result<ConversionResult<RootedTraceableBox<IterableKeyAndValueResult>>, ()>
Convert
val to type Self.
Optional configuration of type T can be passed as the option
argument.
If it returns Err(()), a JSAPI exception is pending.
If it returns Ok(Failure(reason)), there is no pending JSAPI exception.Source§impl FromJSValConvertible for RootedTraceableBox<IterableKeyOrValueResult>
impl FromJSValConvertible for RootedTraceableBox<IterableKeyOrValueResult>
Source§unsafe fn from_jsval(
cx: *mut JSContext,
value: Handle<'_, Value>,
_option: (),
) -> Result<ConversionResult<RootedTraceableBox<IterableKeyOrValueResult>>, ()>
unsafe fn from_jsval( cx: *mut JSContext, value: Handle<'_, Value>, _option: (), ) -> Result<ConversionResult<RootedTraceableBox<IterableKeyOrValueResult>>, ()>
Convert
val to type Self.
Optional configuration of type T can be passed as the option
argument.
If it returns Err(()), a JSAPI exception is pending.
If it returns Ok(Failure(reason)), there is no pending JSAPI exception.Source§impl<D> FromJSValConvertible for RootedTraceableBox<MessageEventInit<D>>where
D: DomTypes,
impl<D> FromJSValConvertible for RootedTraceableBox<MessageEventInit<D>>where
D: DomTypes,
Source§unsafe fn from_jsval(
cx: *mut JSContext,
value: Handle<'_, Value>,
_option: (),
) -> Result<ConversionResult<RootedTraceableBox<MessageEventInit<D>>>, ()>
unsafe fn from_jsval( cx: *mut JSContext, value: Handle<'_, Value>, _option: (), ) -> Result<ConversionResult<RootedTraceableBox<MessageEventInit<D>>>, ()>
Convert
val to type Self.
Optional configuration of type T can be passed as the option
argument.
If it returns Err(()), a JSAPI exception is pending.
If it returns Ok(Failure(reason)), there is no pending JSAPI exception.Source§impl FromJSValConvertible for RootedTraceableBox<NotificationOptions>
impl FromJSValConvertible for RootedTraceableBox<NotificationOptions>
Source§unsafe fn from_jsval(
cx: *mut JSContext,
value: Handle<'_, Value>,
_option: (),
) -> Result<ConversionResult<RootedTraceableBox<NotificationOptions>>, ()>
unsafe fn from_jsval( cx: *mut JSContext, value: Handle<'_, Value>, _option: (), ) -> Result<ConversionResult<RootedTraceableBox<NotificationOptions>>, ()>
Convert
val to type Self.
Optional configuration of type T can be passed as the option
argument.
If it returns Err(()), a JSAPI exception is pending.
If it returns Ok(Failure(reason)), there is no pending JSAPI exception.Source§impl FromJSValConvertible for RootedTraceableBox<Pbkdf2Params>
impl FromJSValConvertible for RootedTraceableBox<Pbkdf2Params>
Source§unsafe fn from_jsval(
cx: *mut JSContext,
value: Handle<'_, Value>,
_option: (),
) -> Result<ConversionResult<RootedTraceableBox<Pbkdf2Params>>, ()>
unsafe fn from_jsval( cx: *mut JSContext, value: Handle<'_, Value>, _option: (), ) -> Result<ConversionResult<RootedTraceableBox<Pbkdf2Params>>, ()>
Convert
val to type Self.
Optional configuration of type T can be passed as the option
argument.
If it returns Err(()), a JSAPI exception is pending.
If it returns Ok(Failure(reason)), there is no pending JSAPI exception.Source§impl FromJSValConvertible for RootedTraceableBox<PopStateEventInit>
impl FromJSValConvertible for RootedTraceableBox<PopStateEventInit>
Source§unsafe fn from_jsval(
cx: *mut JSContext,
value: Handle<'_, Value>,
_option: (),
) -> Result<ConversionResult<RootedTraceableBox<PopStateEventInit>>, ()>
unsafe fn from_jsval( cx: *mut JSContext, value: Handle<'_, Value>, _option: (), ) -> Result<ConversionResult<RootedTraceableBox<PopStateEventInit>>, ()>
Convert
val to type Self.
Optional configuration of type T can be passed as the option
argument.
If it returns Err(()), a JSAPI exception is pending.
If it returns Ok(Failure(reason)), there is no pending JSAPI exception.Source§impl FromJSValConvertible for RootedTraceableBox<PromiseRejectionEventInit>
impl FromJSValConvertible for RootedTraceableBox<PromiseRejectionEventInit>
Source§unsafe fn from_jsval(
cx: *mut JSContext,
value: Handle<'_, Value>,
_option: (),
) -> Result<ConversionResult<RootedTraceableBox<PromiseRejectionEventInit>>, ()>
unsafe fn from_jsval( cx: *mut JSContext, value: Handle<'_, Value>, _option: (), ) -> Result<ConversionResult<RootedTraceableBox<PromiseRejectionEventInit>>, ()>
Convert
val to type Self.
Optional configuration of type T can be passed as the option
argument.
If it returns Err(()), a JSAPI exception is pending.
If it returns Ok(Failure(reason)), there is no pending JSAPI exception.Source§impl FromJSValConvertible for RootedTraceableBox<ReadableStreamReadResult>
impl FromJSValConvertible for RootedTraceableBox<ReadableStreamReadResult>
Source§unsafe fn from_jsval(
cx: *mut JSContext,
value: Handle<'_, Value>,
_option: (),
) -> Result<ConversionResult<RootedTraceableBox<ReadableStreamReadResult>>, ()>
unsafe fn from_jsval( cx: *mut JSContext, value: Handle<'_, Value>, _option: (), ) -> Result<ConversionResult<RootedTraceableBox<ReadableStreamReadResult>>, ()>
Convert
val to type Self.
Optional configuration of type T can be passed as the option
argument.
If it returns Err(()), a JSAPI exception is pending.
If it returns Ok(Failure(reason)), there is no pending JSAPI exception.Source§impl<D> FromJSValConvertible for RootedTraceableBox<RequestInit<D>>where
D: DomTypes,
impl<D> FromJSValConvertible for RootedTraceableBox<RequestInit<D>>where
D: DomTypes,
Source§unsafe fn from_jsval(
cx: *mut JSContext,
value: Handle<'_, Value>,
_option: (),
) -> Result<ConversionResult<RootedTraceableBox<RequestInit<D>>>, ()>
unsafe fn from_jsval( cx: *mut JSContext, value: Handle<'_, Value>, _option: (), ) -> Result<ConversionResult<RootedTraceableBox<RequestInit<D>>>, ()>
Convert
val to type Self.
Optional configuration of type T can be passed as the option
argument.
If it returns Err(()), a JSAPI exception is pending.
If it returns Ok(Failure(reason)), there is no pending JSAPI exception.Source§impl FromJSValConvertible for RootedTraceableBox<StructuredSerializeOptions>
impl FromJSValConvertible for RootedTraceableBox<StructuredSerializeOptions>
Source§unsafe fn from_jsval(
cx: *mut JSContext,
value: Handle<'_, Value>,
_option: (),
) -> Result<ConversionResult<RootedTraceableBox<StructuredSerializeOptions>>, ()>
unsafe fn from_jsval( cx: *mut JSContext, value: Handle<'_, Value>, _option: (), ) -> Result<ConversionResult<RootedTraceableBox<StructuredSerializeOptions>>, ()>
Convert
val to type Self.
Optional configuration of type T can be passed as the option
argument.
If it returns Err(()), a JSAPI exception is pending.
If it returns Ok(Failure(reason)), there is no pending JSAPI exception.Source§impl<D> FromJSValConvertible for RootedTraceableBox<TestDictionary<D>>where
D: DomTypes,
impl<D> FromJSValConvertible for RootedTraceableBox<TestDictionary<D>>where
D: DomTypes,
Source§unsafe fn from_jsval(
cx: *mut JSContext,
value: Handle<'_, Value>,
_option: (),
) -> Result<ConversionResult<RootedTraceableBox<TestDictionary<D>>>, ()>
unsafe fn from_jsval( cx: *mut JSContext, value: Handle<'_, Value>, _option: (), ) -> Result<ConversionResult<RootedTraceableBox<TestDictionary<D>>>, ()>
Convert
val to type Self.
Optional configuration of type T can be passed as the option
argument.
If it returns Err(()), a JSAPI exception is pending.
If it returns Ok(Failure(reason)), there is no pending JSAPI exception.Source§impl FromJSValConvertible for RootedTraceableBox<TestDictionaryDefaults>
impl FromJSValConvertible for RootedTraceableBox<TestDictionaryDefaults>
Source§unsafe fn from_jsval(
cx: *mut JSContext,
value: Handle<'_, Value>,
_option: (),
) -> Result<ConversionResult<RootedTraceableBox<TestDictionaryDefaults>>, ()>
unsafe fn from_jsval( cx: *mut JSContext, value: Handle<'_, Value>, _option: (), ) -> Result<ConversionResult<RootedTraceableBox<TestDictionaryDefaults>>, ()>
Convert
val to type Self.
Optional configuration of type T can be passed as the option
argument.
If it returns Err(()), a JSAPI exception is pending.
If it returns Ok(Failure(reason)), there is no pending JSAPI exception.Source§impl<D> FromJSValConvertible for RootedTraceableBox<Transformer<D>>where
D: DomTypes,
impl<D> FromJSValConvertible for RootedTraceableBox<Transformer<D>>where
D: DomTypes,
Source§unsafe fn from_jsval(
cx: *mut JSContext,
value: Handle<'_, Value>,
_option: (),
) -> Result<ConversionResult<RootedTraceableBox<Transformer<D>>>, ()>
unsafe fn from_jsval( cx: *mut JSContext, value: Handle<'_, Value>, _option: (), ) -> Result<ConversionResult<RootedTraceableBox<Transformer<D>>>, ()>
Convert
val to type Self.
Optional configuration of type T can be passed as the option
argument.
If it returns Err(()), a JSAPI exception is pending.
If it returns Ok(Failure(reason)), there is no pending JSAPI exception.Source§impl<D> FromJSValConvertible for RootedTraceableBox<UnderlyingSink<D>>where
D: DomTypes,
impl<D> FromJSValConvertible for RootedTraceableBox<UnderlyingSink<D>>where
D: DomTypes,
Source§unsafe fn from_jsval(
cx: *mut JSContext,
value: Handle<'_, Value>,
_option: (),
) -> Result<ConversionResult<RootedTraceableBox<UnderlyingSink<D>>>, ()>
unsafe fn from_jsval( cx: *mut JSContext, value: Handle<'_, Value>, _option: (), ) -> Result<ConversionResult<RootedTraceableBox<UnderlyingSink<D>>>, ()>
Convert
val to type Self.
Optional configuration of type T can be passed as the option
argument.
If it returns Err(()), a JSAPI exception is pending.
If it returns Ok(Failure(reason)), there is no pending JSAPI exception.Source§impl FromJSValConvertible for RootedTraceableBox<WindowPostMessageOptions>
impl FromJSValConvertible for RootedTraceableBox<WindowPostMessageOptions>
Source§unsafe fn from_jsval(
cx: *mut JSContext,
value: Handle<'_, Value>,
_option: (),
) -> Result<ConversionResult<RootedTraceableBox<WindowPostMessageOptions>>, ()>
unsafe fn from_jsval( cx: *mut JSContext, value: Handle<'_, Value>, _option: (), ) -> Result<ConversionResult<RootedTraceableBox<WindowPostMessageOptions>>, ()>
Convert
val to type Self.
Optional configuration of type T can be passed as the option
argument.
If it returns Err(()), a JSAPI exception is pending.
If it returns Ok(Failure(reason)), there is no pending JSAPI exception.Source§impl FromJSValConvertible for RootedTraceableBox<XRSessionInit>
impl FromJSValConvertible for RootedTraceableBox<XRSessionInit>
Source§unsafe fn from_jsval(
cx: *mut JSContext,
value: Handle<'_, Value>,
_option: (),
) -> Result<ConversionResult<RootedTraceableBox<XRSessionInit>>, ()>
unsafe fn from_jsval( cx: *mut JSContext, value: Handle<'_, Value>, _option: (), ) -> Result<ConversionResult<RootedTraceableBox<XRSessionInit>>, ()>
Convert
val to type Self.
Optional configuration of type T can be passed as the option
argument.
If it returns Err(()), a JSAPI exception is pending.
If it returns Ok(Failure(reason)), there is no pending JSAPI exception.Source§impl<T> MallocSizeOf for RootedTraceableBox<T>where
T: Traceable + MallocSizeOf,
impl<T> MallocSizeOf for RootedTraceableBox<T>where
T: Traceable + MallocSizeOf,
Source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but
not the space taken up by the value itself.
Source§impl<T> ToJSValConvertible for RootedTraceableBox<T>where
T: ToJSValConvertible + Traceable,
impl<T> ToJSValConvertible for RootedTraceableBox<T>where
T: ToJSValConvertible + Traceable,
Source§impl<T> Traceable for RootedTraceableBox<T>where
T: Traceable + 'static,
impl<T> Traceable for RootedTraceableBox<T>where
T: Traceable + 'static,
Auto Trait Implementations§
impl<T> Freeze for RootedTraceableBox<T>
impl<T> RefUnwindSafe for RootedTraceableBox<T>where
T: RefUnwindSafe,
impl<T> !Send for RootedTraceableBox<T>
impl<T> !Sync for RootedTraceableBox<T>
impl<T> Unpin for RootedTraceableBox<T>
impl<T> UnwindSafe for RootedTraceableBox<T>where
T: RefUnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Filterable for T
impl<T> Filterable for T
Source§fn filterable(
self,
filter_name: &'static str,
) -> RequestFilterDataProvider<T, fn(DataRequest<'_>) -> bool>
fn filterable( self, filter_name: &'static str, ) -> RequestFilterDataProvider<T, fn(DataRequest<'_>) -> bool>
Creates a filterable data provider with the given name for debugging. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
Source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
Source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
Source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R> Rng for R
impl<R> Rng for R
Source§fn random<T>(&mut self) -> Twhere
StandardUniform: Distribution<T>,
fn random<T>(&mut self) -> Twhere
StandardUniform: Distribution<T>,
Return a random value via the
StandardUniform distribution. Read moreSource§fn random_iter<T>(self) -> Iter<StandardUniform, Self, T>
fn random_iter<T>(self) -> Iter<StandardUniform, Self, T>
Source§fn random_range<T, R>(&mut self, range: R) -> Twhere
T: SampleUniform,
R: SampleRange<T>,
fn random_range<T, R>(&mut self, range: R) -> Twhere
T: SampleUniform,
R: SampleRange<T>,
Generate a random value in the given range. Read more
Source§fn random_bool(&mut self, p: f64) -> bool
fn random_bool(&mut self, p: f64) -> bool
Return a bool with a probability
p of being true. Read moreSource§fn random_ratio(&mut self, numerator: u32, denominator: u32) -> bool
fn random_ratio(&mut self, numerator: u32, denominator: u32) -> bool
Return a bool with a probability of
numerator/denominator of being
true. Read moreSource§fn sample<T, D>(&mut self, distr: D) -> Twhere
D: Distribution<T>,
fn sample<T, D>(&mut self, distr: D) -> Twhere
D: Distribution<T>,
Sample a new value, using the given distribution. Read more
Source§fn sample_iter<T, D>(self, distr: D) -> Iter<D, Self, T>where
D: Distribution<T>,
Self: Sized,
fn sample_iter<T, D>(self, distr: D) -> Iter<D, Self, T>where
D: Distribution<T>,
Self: Sized,
Create an iterator that generates values using the given distribution. Read more
Source§fn gen<T>(&mut self) -> Twhere
StandardUniform: Distribution<T>,
fn gen<T>(&mut self) -> Twhere
StandardUniform: Distribution<T>,
👎Deprecated since 0.9.0: Renamed to
random to avoid conflict with the new gen keyword in Rust 2024.Alias for
Rng::random.Source§fn gen_range<T, R>(&mut self, range: R) -> Twhere
T: SampleUniform,
R: SampleRange<T>,
fn gen_range<T, R>(&mut self, range: R) -> Twhere
T: SampleUniform,
R: SampleRange<T>,
👎Deprecated since 0.9.0: Renamed to
random_rangeAlias for
Rng::random_range.Source§impl<T> SafeFromJSValConvertible for Twhere
T: FromJSValConvertible,
impl<T> SafeFromJSValConvertible for Twhere
T: FromJSValConvertible,
type Config = <T as FromJSValConvertible>::Config
fn safe_from_jsval( cx: JSContext, value: Handle<'_, Value>, option: <T as SafeFromJSValConvertible>::Config, ) -> Result<ConversionResult<T>, ()>
Source§impl<T> SafeToJSValConvertible for Twhere
T: ToJSValConvertible + ?Sized,
impl<T> SafeToJSValConvertible for Twhere
T: ToJSValConvertible + ?Sized,
fn safe_to_jsval( &self, cx: JSContext, rval: MutableHandle<'_, Value>, _can_gc: CanGc, )
Source§impl<R> TryRngCore for R
impl<R> TryRngCore for R
Source§type Error = Infallible
type Error = Infallible
The type returned in the event of a RNG error.
Source§fn try_next_u32(&mut self) -> Result<u32, <R as TryRngCore>::Error>
fn try_next_u32(&mut self) -> Result<u32, <R as TryRngCore>::Error>
Return the next random
u32.Source§fn try_next_u64(&mut self) -> Result<u64, <R as TryRngCore>::Error>
fn try_next_u64(&mut self) -> Result<u64, <R as TryRngCore>::Error>
Return the next random
u64.Source§fn try_fill_bytes(
&mut self,
dst: &mut [u8],
) -> Result<(), <R as TryRngCore>::Error>
fn try_fill_bytes( &mut self, dst: &mut [u8], ) -> Result<(), <R as TryRngCore>::Error>
Fill
dest entirely with random data.Source§fn unwrap_mut(&mut self) -> UnwrapMut<'_, Self>
fn unwrap_mut(&mut self) -> UnwrapMut<'_, Self>
Wrap RNG with the
UnwrapMut wrapper.Source§fn read_adapter(&mut self) -> RngReadAdapter<'_, Self>where
Self: Sized,
fn read_adapter(&mut self) -> RngReadAdapter<'_, Self>where
Self: Sized,
Convert an
RngCore to a RngReadAdapter.