Skip to main content

InternalMethods

Trait InternalMethods 

Source
pub trait InternalMethods<'a>
where Self: InternalSlots<'a>,
{
Show 26 methods // Provided methods fn try_get_prototype_of<'gc>( self, agent: &mut Agent, gc: NoGcScope<'gc, '_>, ) -> TryResult<'gc, Option<Object<'gc>>> { ... } fn internal_get_prototype_of<'gc>( self, agent: &mut Agent, gc: GcScope<'gc, '_>, ) -> JsResult<'gc, Option<Object<'gc>>> { ... } fn try_set_prototype_of<'gc>( self, agent: &mut Agent, prototype: Option<Object<'_>>, gc: NoGcScope<'gc, '_>, ) -> TryResult<'gc, bool> { ... } fn internal_set_prototype_of<'gc>( self, agent: &mut Agent, prototype: Option<Object<'_>>, gc: GcScope<'gc, '_>, ) -> JsResult<'gc, bool> { ... } fn try_is_extensible<'gc>( self, agent: &mut Agent, _gc: NoGcScope<'gc, '_>, ) -> TryResult<'gc, bool> { ... } fn internal_is_extensible<'gc>( self, agent: &mut Agent, gc: GcScope<'gc, '_>, ) -> JsResult<'gc, bool> { ... } fn try_prevent_extensions<'gc>( self, agent: &mut Agent, _gc: NoGcScope<'gc, '_>, ) -> TryResult<'gc, bool> { ... } fn internal_prevent_extensions<'gc>( self, agent: &mut Agent, gc: GcScope<'gc, '_>, ) -> JsResult<'gc, bool> { ... } fn try_get_own_property<'gc>( self, agent: &mut Agent, property_key: PropertyKey<'_>, cache: Option<PropertyLookupCache<'_>>, gc: NoGcScope<'gc, '_>, ) -> TryResult<'gc, Option<PropertyDescriptor<'gc>>> { ... } fn internal_get_own_property<'gc>( self, agent: &mut Agent, property_key: PropertyKey<'_>, gc: GcScope<'gc, '_>, ) -> JsResult<'gc, Option<PropertyDescriptor<'gc>>> { ... } fn try_define_own_property<'gc>( self, agent: &mut Agent, property_key: PropertyKey<'_>, property_descriptor: PropertyDescriptor<'_>, cache: Option<PropertyLookupCache<'_>>, gc: NoGcScope<'gc, '_>, ) -> TryResult<'gc, bool> { ... } fn internal_define_own_property<'gc>( self, agent: &mut Agent, property_key: PropertyKey<'_>, property_descriptor: PropertyDescriptor<'_>, gc: GcScope<'gc, '_>, ) -> JsResult<'gc, bool> { ... } fn try_has_property<'gc>( self, agent: &mut Agent, property_key: PropertyKey<'_>, cache: Option<PropertyLookupCache<'_>>, gc: NoGcScope<'gc, '_>, ) -> TryResult<'gc, TryHasResult<'gc>> { ... } fn internal_has_property<'gc>( self, agent: &mut Agent, property_key: PropertyKey<'_>, gc: GcScope<'gc, '_>, ) -> JsResult<'gc, bool> { ... } fn try_get<'gc>( self, agent: &mut Agent, property_key: PropertyKey<'_>, receiver: Value<'_>, cache: Option<PropertyLookupCache<'_>>, gc: NoGcScope<'gc, '_>, ) -> TryResult<'gc, TryGetResult<'gc>> { ... } fn internal_get<'gc>( self, agent: &mut Agent, property_key: PropertyKey<'_>, receiver: Value<'_>, gc: GcScope<'gc, '_>, ) -> JsResult<'gc, Value<'gc>> { ... } fn try_set<'gc>( self, agent: &mut Agent, property_key: PropertyKey<'_>, value: Value<'_>, receiver: Value<'_>, cache: Option<PropertyLookupCache<'_>>, gc: NoGcScope<'gc, '_>, ) -> TryResult<'gc, SetResult<'gc>> { ... } fn internal_set<'gc>( self, agent: &mut Agent, property_key: PropertyKey<'_>, value: Value<'_>, receiver: Value<'_>, gc: GcScope<'gc, '_>, ) -> JsResult<'gc, bool> { ... } fn try_delete<'gc>( self, agent: &mut Agent, property_key: PropertyKey<'_>, gc: NoGcScope<'gc, '_>, ) -> TryResult<'gc, bool> { ... } fn internal_delete<'gc>( self, agent: &mut Agent, property_key: PropertyKey<'_>, gc: GcScope<'gc, '_>, ) -> JsResult<'gc, bool> { ... } fn try_own_property_keys<'gc>( self, agent: &mut Agent, gc: NoGcScope<'gc, '_>, ) -> TryResult<'gc, Vec<PropertyKey<'gc>>> { ... } fn internal_own_property_keys<'gc>( self, agent: &mut Agent, gc: GcScope<'gc, '_>, ) -> JsResult<'gc, Vec<PropertyKey<'gc>>> { ... } fn get_own_property_at_offset<'gc>( self, agent: &Agent, offset: PropertyOffset, gc: NoGcScope<'gc, '_>, ) -> TryGetResult<'gc> { ... } fn set_at_offset<'gc>( self, agent: &mut Agent, props: &SetAtOffsetProps<'_>, offset: PropertyOffset, gc: NoGcScope<'gc, '_>, ) -> TryResult<'gc, SetResult<'gc>> { ... } fn internal_call<'gc>( self, agent: &mut Agent, this_value: Value<'_>, arguments_list: ArgumentsList<'_, '_>, gc: GcScope<'gc, '_>, ) -> JsResult<'gc, Value<'gc>> { ... } fn internal_construct<'gc>( self, agent: &mut Agent, arguments_list: ArgumentsList<'_, '_>, new_target: Function<'_>, gc: GcScope<'gc, '_>, ) -> JsResult<'gc, Object<'gc>> { ... }
}
Expand description

Provided Methods§

Source

fn try_get_prototype_of<'gc>( self, agent: &mut Agent, gc: NoGcScope<'gc, '_>, ) -> TryResult<'gc, Option<Object<'gc>>>

§Infallible [[GetPrototypeOf]]

This is an infallible variant of the method that does not allow calling into JavaScript or triggering garbage collection. If the internal method cannot be completed without calling into JavaScript, then TryError is returned. It is preferable to call this method first and only call the main method if this fails.

Source

fn internal_get_prototype_of<'gc>( self, agent: &mut Agent, gc: GcScope<'gc, '_>, ) -> JsResult<'gc, Option<Object<'gc>>>

§[[GetPrototypeOf]]
Source

fn try_set_prototype_of<'gc>( self, agent: &mut Agent, prototype: Option<Object<'_>>, gc: NoGcScope<'gc, '_>, ) -> TryResult<'gc, bool>

§Infallible [[SetPrototypeOf]]

This is an infallible variant of the method that does not allow calling into JavaScript or triggering garbage collection. If the internal method cannot be completed without calling into JavaScript, then TryError is returned. It is preferable to call this method first and only call the main method if this fails.

Source

fn internal_set_prototype_of<'gc>( self, agent: &mut Agent, prototype: Option<Object<'_>>, gc: GcScope<'gc, '_>, ) -> JsResult<'gc, bool>

§[[SetPrototypeOf]]
Source

fn try_is_extensible<'gc>( self, agent: &mut Agent, _gc: NoGcScope<'gc, '_>, ) -> TryResult<'gc, bool>

§Infallible [[IsExtensible]]

This is an infallible variant of the method that does not allow calling into JavaScript or triggering garbage collection. If the internal method cannot be completed without calling into JavaScript, then TryError is returned. It is preferable to call this method first and only call the main method if this fails.

Source

fn internal_is_extensible<'gc>( self, agent: &mut Agent, gc: GcScope<'gc, '_>, ) -> JsResult<'gc, bool>

§[[IsExtensible]]
Source

fn try_prevent_extensions<'gc>( self, agent: &mut Agent, _gc: NoGcScope<'gc, '_>, ) -> TryResult<'gc, bool>

§Infallible [[PreventExtensions]]

This is an infallible variant of the method that does not allow calling into JavaScript or triggering garbage collection. If the internal method cannot be completed without calling into JavaScript, then TryError is returned. It is preferable to call this method first and only call the main method if this fails.

Source

fn internal_prevent_extensions<'gc>( self, agent: &mut Agent, gc: GcScope<'gc, '_>, ) -> JsResult<'gc, bool>

§[[PreventExtensions]]
Source

fn try_get_own_property<'gc>( self, agent: &mut Agent, property_key: PropertyKey<'_>, cache: Option<PropertyLookupCache<'_>>, gc: NoGcScope<'gc, '_>, ) -> TryResult<'gc, Option<PropertyDescriptor<'gc>>>

§Infallible [[GetOwnProperty]]

This is an infallible variant of the method that does not allow calling into JavaScript or triggering garbage collection. If the internal method cannot be completed without calling into JavaScript, then TryError is returned. It is preferable to call this method first and only call the main method if this fails.

Source

fn internal_get_own_property<'gc>( self, agent: &mut Agent, property_key: PropertyKey<'_>, gc: GcScope<'gc, '_>, ) -> JsResult<'gc, Option<PropertyDescriptor<'gc>>>

§[[GetOwnProperty]]
Source

fn try_define_own_property<'gc>( self, agent: &mut Agent, property_key: PropertyKey<'_>, property_descriptor: PropertyDescriptor<'_>, cache: Option<PropertyLookupCache<'_>>, gc: NoGcScope<'gc, '_>, ) -> TryResult<'gc, bool>

§Infallible [[DefineOwnProperty]]

This is an infallible variant of the method that does not allow calling into JavaScript or triggering garbage collection. If the internal method cannot be completed without calling into JavaScript, then TryError is returned. It is preferable to call this method first and only call the main method if this fails.

Source

fn internal_define_own_property<'gc>( self, agent: &mut Agent, property_key: PropertyKey<'_>, property_descriptor: PropertyDescriptor<'_>, gc: GcScope<'gc, '_>, ) -> JsResult<'gc, bool>

§[[DefineOwnProperty]]
Source

fn try_has_property<'gc>( self, agent: &mut Agent, property_key: PropertyKey<'_>, cache: Option<PropertyLookupCache<'_>>, gc: NoGcScope<'gc, '_>, ) -> TryResult<'gc, TryHasResult<'gc>>

§Infallible [[HasProperty]]

This is an infallible variant of the method that does not allow calling into JavaScript or triggering garbage collection. If the internal method cannot be completed without calling into JavaScript, then TryError is returned. It is preferable to call this method first and only call the main method if this fails.

Source

fn internal_has_property<'gc>( self, agent: &mut Agent, property_key: PropertyKey<'_>, gc: GcScope<'gc, '_>, ) -> JsResult<'gc, bool>

§[[HasProperty]]
Source

fn try_get<'gc>( self, agent: &mut Agent, property_key: PropertyKey<'_>, receiver: Value<'_>, cache: Option<PropertyLookupCache<'_>>, gc: NoGcScope<'gc, '_>, ) -> TryResult<'gc, TryGetResult<'gc>>

§Try [[Get]]

This is a variant of the method that does not allow calling into JavaScript or triggering garbage collection. If the internal method cannot be completed without calling into JavaScript, then TryBreak is returned.

Source

fn internal_get<'gc>( self, agent: &mut Agent, property_key: PropertyKey<'_>, receiver: Value<'_>, gc: GcScope<'gc, '_>, ) -> JsResult<'gc, Value<'gc>>

§[[Get]]
Source

fn try_set<'gc>( self, agent: &mut Agent, property_key: PropertyKey<'_>, value: Value<'_>, receiver: Value<'_>, cache: Option<PropertyLookupCache<'_>>, gc: NoGcScope<'gc, '_>, ) -> TryResult<'gc, SetResult<'gc>>

§Infallible [[Set]]

This is an infallible variant of the method that does not allow calling into JavaScript or triggering garbage collection. If the internal method cannot be completed without calling into JavaScript, then TryError is returned. It is preferable to call this method first and only call the main method if this fails.

Source

fn internal_set<'gc>( self, agent: &mut Agent, property_key: PropertyKey<'_>, value: Value<'_>, receiver: Value<'_>, gc: GcScope<'gc, '_>, ) -> JsResult<'gc, bool>

§[[Set]]
Source

fn try_delete<'gc>( self, agent: &mut Agent, property_key: PropertyKey<'_>, gc: NoGcScope<'gc, '_>, ) -> TryResult<'gc, bool>

§Infallible [[Delete]]

This is an infallible variant of the method that does not allow calling into JavaScript or triggering garbage collection. If the internal method cannot be completed without calling into JavaScript, then TryError is returned. It is preferable to call this method first and only call the main method if this fails.

Source

fn internal_delete<'gc>( self, agent: &mut Agent, property_key: PropertyKey<'_>, gc: GcScope<'gc, '_>, ) -> JsResult<'gc, bool>

§[[Delete]]
Source

fn try_own_property_keys<'gc>( self, agent: &mut Agent, gc: NoGcScope<'gc, '_>, ) -> TryResult<'gc, Vec<PropertyKey<'gc>>>

§Infallible [[OwnPropertyKeys]]

This is an infallible variant of the method that does not allow calling into JavaScript or triggering garbage collection. If the internal method cannot be completed without calling into JavaScript, then TryError is returned. It is preferable to call this method first and only call the main method if this fails.

Source

fn internal_own_property_keys<'gc>( self, agent: &mut Agent, gc: GcScope<'gc, '_>, ) -> JsResult<'gc, Vec<PropertyKey<'gc>>>

§[[OwnPropertyKeys]]
Source

fn get_own_property_at_offset<'gc>( self, agent: &Agent, offset: PropertyOffset, gc: NoGcScope<'gc, '_>, ) -> TryGetResult<'gc>

§[[GetOwnProperty]] method with offset.

This is a variant of the [[GetOwnProperty]] method that reads a property value (or getter function) at an offset based on cached data. The method cannot call into JavaScript and is used as part of the [[Get]] method’s cached variant.

Source

fn set_at_offset<'gc>( self, agent: &mut Agent, props: &SetAtOffsetProps<'_>, offset: PropertyOffset, gc: NoGcScope<'gc, '_>, ) -> TryResult<'gc, SetResult<'gc>>

§[[Set]] method with offset.

This is a variant of the [[Set]] method that attempts to set the value of property at an offset. The method cannot call into JavaScript or trigger garbage collection, and any such needs must be interrupted and control returned to the caller. The method is used as part of the [[Set]] method’s cached variant.

Source

fn internal_call<'gc>( self, agent: &mut Agent, this_value: Value<'_>, arguments_list: ArgumentsList<'_, '_>, gc: GcScope<'gc, '_>, ) -> JsResult<'gc, Value<'gc>>

§[[Call]]
Source

fn internal_construct<'gc>( self, agent: &mut Agent, arguments_list: ArgumentsList<'_, '_>, new_target: Function<'_>, gc: GcScope<'gc, '_>, ) -> JsResult<'gc, Object<'gc>>

§[[Construct]]

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<'a, T: 'a + FunctionInternalProperties<'a>> InternalMethods<'a> for T

Source§

impl<'a, T: Viewable> InternalMethods<'a> for GenericSharedTypedArray<'a, T>

Source§

impl<'a, T: Viewable> InternalMethods<'a> for GenericTypedArray<'a, T>

Source§

impl<'a> InternalMethods<'a> for AnyTypedArray<'a>

Source§

impl<'a> InternalMethods<'a> for Array<'a>

Source§

impl<'a> InternalMethods<'a> for ArrayBuffer<'a>

Source§

impl<'a> InternalMethods<'a> for ArrayIterator<'a>

Source§

impl<'a> InternalMethods<'a> for AsyncGenerator<'a>

Source§

impl<'a> InternalMethods<'a> for DataView<'a>

Source§

impl<'a> InternalMethods<'a> for Date<'a>

Source§

impl<'a> InternalMethods<'a> for EmbedderObject<'a>

Source§

impl<'a> InternalMethods<'a> for Error<'a>

Source§

impl<'a> InternalMethods<'a> for FinalizationRegistry<'a>

Source§

impl<'a> InternalMethods<'a> for Function<'a>

Source§

impl<'a> InternalMethods<'a> for Generator<'a>

Source§

impl<'a> InternalMethods<'a> for Map<'a>

Source§

impl<'a> InternalMethods<'a> for MapIterator<'a>

Source§

impl<'a> InternalMethods<'a> for Module<'a>

Source§

impl<'a> InternalMethods<'a> for Object<'a>

Source§

impl<'a> InternalMethods<'a> for OrdinaryObject<'a>

Source§

impl<'a> InternalMethods<'a> for PrimitiveObject<'a>

Source§

impl<'a> InternalMethods<'a> for Promise<'a>

Source§

impl<'a> InternalMethods<'a> for Proxy<'a>

Source§

impl<'a> InternalMethods<'a> for RegExp<'a>

Source§

impl<'a> InternalMethods<'a> for RegExpStringIterator<'a>

Source§

impl<'a> InternalMethods<'a> for Set<'a>

Source§

impl<'a> InternalMethods<'a> for SetIterator<'a>

Source§

impl<'a> InternalMethods<'a> for SharedArrayBuffer<'a>

Source§

impl<'a> InternalMethods<'a> for SharedDataView<'a>

Available on crate feature shared-array-buffer only.
Source§

impl<'a> InternalMethods<'a> for SharedTypedArray<'a>

Source§

impl<'a> InternalMethods<'a> for StringIterator<'a>

Source§

impl<'a> InternalMethods<'a> for TemporalDuration<'a>

Source§

impl<'a> InternalMethods<'a> for TemporalInstant<'a>

Source§

impl<'a> InternalMethods<'a> for TemporalPlainTime<'a>

Source§

impl<'a> InternalMethods<'a> for TypedArray<'a>

Source§

impl<'a> InternalMethods<'a> for WeakMap<'a>

Source§

impl<'a> InternalMethods<'a> for WeakRef<'a>

Source§

impl<'a> InternalMethods<'a> for WeakSet<'a>