Expand description
Objects: reference-counted values shared with C++ and Python, and the
traits that define object types (ObjectCore) and their managed
references (ObjectRefCore).
Structs§
- Object
- The root object type,
ffi.Object: just the object header. - Object
Arc - A reference-counted pointer to an object
T, asArc<T>, counting with the object header so that every language shares the count. - Object
Identity - An owning, hashable identity key for an FFI object.
- Object
Ref - A managed reference to an object of any type, the root of every object
reference; downcast it to a concrete reference with
ObjectRefCore::downcast.
Traits§
- Immutable
Object - An object type whose shared instances are never mutated, so
ObjectArc<T>isSend + SyncwhenT’s fields are. - Object
Core - The native representation of an object-system type.
- Object
Core With Extra Items - An object type whose allocation is followed by a run of extra items, such
as the dimensions of a
Shape. - Object
RefAny Compatible - The
AnyCompatibleimplementation of an object reference, with every hook defaulted: every implementer isAnyCompatible. - Object
RefCore - A managed object reference, such as
ObjectRef,Array<T>or a#[derive(ObjectRef)]type, with identity (same_as) and strict casts that check the runtime type and never convert; upcasts areFrom/Into.
Functions§
- fmt_
object_ ref - Format a managed reference as its runtime type key and object address, as
the
Debugimplementation of#[derive(ObjectRef)]does. - is_
instance_ of - Whether the runtime type index of an object is
Targetor one of its subtypes, by walking the registered type hierarchy.