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§
Sourcefn try_get_prototype_of<'gc>(
self,
agent: &mut Agent,
gc: NoGcScope<'gc, '_>,
) -> TryResult<'gc, Option<Object<'gc>>>
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.
Sourcefn internal_get_prototype_of<'gc>(
self,
agent: &mut Agent,
gc: GcScope<'gc, '_>,
) -> JsResult<'gc, Option<Object<'gc>>>
fn internal_get_prototype_of<'gc>( self, agent: &mut Agent, gc: GcScope<'gc, '_>, ) -> JsResult<'gc, Option<Object<'gc>>>
§[[GetPrototypeOf]]
Sourcefn try_set_prototype_of<'gc>(
self,
agent: &mut Agent,
prototype: Option<Object<'_>>,
gc: NoGcScope<'gc, '_>,
) -> TryResult<'gc, bool>
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.
Sourcefn internal_set_prototype_of<'gc>(
self,
agent: &mut Agent,
prototype: Option<Object<'_>>,
gc: GcScope<'gc, '_>,
) -> JsResult<'gc, bool>
fn internal_set_prototype_of<'gc>( self, agent: &mut Agent, prototype: Option<Object<'_>>, gc: GcScope<'gc, '_>, ) -> JsResult<'gc, bool>
§[[SetPrototypeOf]]
Sourcefn try_is_extensible<'gc>(
self,
agent: &mut Agent,
_gc: NoGcScope<'gc, '_>,
) -> TryResult<'gc, bool>
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.
Sourcefn internal_is_extensible<'gc>(
self,
agent: &mut Agent,
gc: GcScope<'gc, '_>,
) -> JsResult<'gc, bool>
fn internal_is_extensible<'gc>( self, agent: &mut Agent, gc: GcScope<'gc, '_>, ) -> JsResult<'gc, bool>
§[[IsExtensible]]
Sourcefn try_prevent_extensions<'gc>(
self,
agent: &mut Agent,
_gc: NoGcScope<'gc, '_>,
) -> TryResult<'gc, bool>
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.
Sourcefn internal_prevent_extensions<'gc>(
self,
agent: &mut Agent,
gc: GcScope<'gc, '_>,
) -> JsResult<'gc, bool>
fn internal_prevent_extensions<'gc>( self, agent: &mut Agent, gc: GcScope<'gc, '_>, ) -> JsResult<'gc, bool>
§[[PreventExtensions]]
Sourcefn try_get_own_property<'gc>(
self,
agent: &mut Agent,
property_key: PropertyKey<'_>,
cache: Option<PropertyLookupCache<'_>>,
gc: NoGcScope<'gc, '_>,
) -> TryResult<'gc, Option<PropertyDescriptor<'gc>>>
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.
Sourcefn internal_get_own_property<'gc>(
self,
agent: &mut Agent,
property_key: PropertyKey<'_>,
gc: GcScope<'gc, '_>,
) -> JsResult<'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>>>
§[[GetOwnProperty]]
Sourcefn 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 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.
Sourcefn internal_define_own_property<'gc>(
self,
agent: &mut Agent,
property_key: PropertyKey<'_>,
property_descriptor: PropertyDescriptor<'_>,
gc: GcScope<'gc, '_>,
) -> JsResult<'gc, bool>
fn internal_define_own_property<'gc>( self, agent: &mut Agent, property_key: PropertyKey<'_>, property_descriptor: PropertyDescriptor<'_>, gc: GcScope<'gc, '_>, ) -> JsResult<'gc, bool>
§[[DefineOwnProperty]]
Sourcefn try_has_property<'gc>(
self,
agent: &mut Agent,
property_key: PropertyKey<'_>,
cache: Option<PropertyLookupCache<'_>>,
gc: NoGcScope<'gc, '_>,
) -> TryResult<'gc, TryHasResult<'gc>>
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.
Sourcefn internal_has_property<'gc>(
self,
agent: &mut Agent,
property_key: PropertyKey<'_>,
gc: GcScope<'gc, '_>,
) -> JsResult<'gc, bool>
fn internal_has_property<'gc>( self, agent: &mut Agent, property_key: PropertyKey<'_>, gc: GcScope<'gc, '_>, ) -> JsResult<'gc, bool>
§[[HasProperty]]
Sourcefn try_get<'gc>(
self,
agent: &mut Agent,
property_key: PropertyKey<'_>,
receiver: Value<'_>,
cache: Option<PropertyLookupCache<'_>>,
gc: NoGcScope<'gc, '_>,
) -> TryResult<'gc, TryGetResult<'gc>>
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.
Sourcefn internal_get<'gc>(
self,
agent: &mut Agent,
property_key: PropertyKey<'_>,
receiver: Value<'_>,
gc: GcScope<'gc, '_>,
) -> JsResult<'gc, Value<'gc>>
fn internal_get<'gc>( self, agent: &mut Agent, property_key: PropertyKey<'_>, receiver: Value<'_>, gc: GcScope<'gc, '_>, ) -> JsResult<'gc, Value<'gc>>
§[[Get]]
Sourcefn 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 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.
Sourcefn internal_set<'gc>(
self,
agent: &mut Agent,
property_key: PropertyKey<'_>,
value: Value<'_>,
receiver: Value<'_>,
gc: GcScope<'gc, '_>,
) -> JsResult<'gc, bool>
fn internal_set<'gc>( self, agent: &mut Agent, property_key: PropertyKey<'_>, value: Value<'_>, receiver: Value<'_>, gc: GcScope<'gc, '_>, ) -> JsResult<'gc, bool>
§[[Set]]
Sourcefn try_delete<'gc>(
self,
agent: &mut Agent,
property_key: PropertyKey<'_>,
gc: NoGcScope<'gc, '_>,
) -> TryResult<'gc, bool>
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.
Sourcefn internal_delete<'gc>(
self,
agent: &mut Agent,
property_key: PropertyKey<'_>,
gc: GcScope<'gc, '_>,
) -> JsResult<'gc, bool>
fn internal_delete<'gc>( self, agent: &mut Agent, property_key: PropertyKey<'_>, gc: GcScope<'gc, '_>, ) -> JsResult<'gc, bool>
§[[Delete]]
Sourcefn try_own_property_keys<'gc>(
self,
agent: &mut Agent,
gc: NoGcScope<'gc, '_>,
) -> TryResult<'gc, Vec<PropertyKey<'gc>>>
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.
Sourcefn internal_own_property_keys<'gc>(
self,
agent: &mut Agent,
gc: GcScope<'gc, '_>,
) -> JsResult<'gc, Vec<PropertyKey<'gc>>>
fn internal_own_property_keys<'gc>( self, agent: &mut Agent, gc: GcScope<'gc, '_>, ) -> JsResult<'gc, Vec<PropertyKey<'gc>>>
§[[OwnPropertyKeys]]
Sourcefn get_own_property_at_offset<'gc>(
self,
agent: &Agent,
offset: PropertyOffset,
gc: NoGcScope<'gc, '_>,
) -> TryGetResult<'gc>
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.
Sourcefn set_at_offset<'gc>(
self,
agent: &mut Agent,
props: &SetAtOffsetProps<'_>,
offset: PropertyOffset,
gc: NoGcScope<'gc, '_>,
) -> TryResult<'gc, SetResult<'gc>>
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.
Sourcefn internal_call<'gc>(
self,
agent: &mut Agent,
this_value: Value<'_>,
arguments_list: ArgumentsList<'_, '_>,
gc: GcScope<'gc, '_>,
) -> JsResult<'gc, Value<'gc>>
fn internal_call<'gc>( self, agent: &mut Agent, this_value: Value<'_>, arguments_list: ArgumentsList<'_, '_>, gc: GcScope<'gc, '_>, ) -> JsResult<'gc, Value<'gc>>
§[[Call]]
Sourcefn internal_construct<'gc>(
self,
agent: &mut Agent,
arguments_list: ArgumentsList<'_, '_>,
new_target: Function<'_>,
gc: GcScope<'gc, '_>,
) -> JsResult<'gc, Object<'gc>>
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".