Module arret_runtime::boxed [−][src]
Boxed values and heaps
This contains the implementation of our garbage collector and the types it can manage. Some
types (such as Int
and Float
) have corresponding unboxed representations and are only boxed
for the purposes of runtime dynamic typing. Complex values (such as Vector
and Sym
) have no
unboxed representation.
Boxes can also be placed on the stack on in static constants instead of the heap. This is of limited value to Rust code but is frequently used by the compiler to avoid the overhead of allocation and garbage collection.
Modules
collect | Functionality for garbage collecting heaps |
prelude | Prelude of common traits useful for working with boxed values |
refs | References to boxed values |
type_info | Container for runtime type information for boxed data |
Structs
Any | Supertype of all boxed types |
Bool | Union of boolean types |
Char | Boxed Unicode character |
False | Boolean false |
FieldValueIter | Iterates over fields in a record value |
Float | Boxed 64bit floating point value |
FunThunk | Boxed function value with optional captures |
Header | Header for common boxed value metadata |
Heap | Heap of garbage collected boxes |
Int | Boxed 64bit signed integer |
List | List of boxed values |
Map | Immutable map of boxed values |
Nil | Empty list |
Num | Union of numeric types |
Pair | Non-empty list |
Record | User-defined record type |
RecordData | Allocation to store a record’s data |
Set | Immutable set of boxed values |
Str | String value encoded as UTF-8 |
Sym | Interned symbol |
True | Boolean true |
Vector | Immutable vector of boxed values |
Enums
AllocType | Allocation type for boxed values |
AnySubtype | Possible subtypes of this supertype |
BoolSubtype | Possible subtypes of this supertype |
BoxSize | Size of a boxed value in bytes |
FieldValue | Field within a record value |
ListSubtype | Possible subtypes of |
NumSubtype | Possible subtypes of this supertype |
RecordStorage | Describes the storage of a record’s data |
StrStorage | Describes the storage of a string’s data |
TypeTag | Tag byte identifying top-level types |
Constants
ALL_TYPE_TAGS | Static list of all possible type tags |
Statics
FALSE_INSTANCE | Static constant instance of |
NIL_INSTANCE | Static constant instance of |
TRUE_INSTANCE | Static constant instance of |
Traits
AsHeap | Object that can be used as a heap |
BoolMember | Possible subtypes of |
Boxed | Boxed value |
ConstTagged | Marks that this boxed struct has a specific constant type tag |
DistinctTagged | Indicates that this boxed struct does not share type tags with unrelated types |
HashInHeap | Equivalent of |
NumMember | Possible subtypes of |
PartialEqInHeap | Equivalent of |
UniqueTagged | Marks that every boxed value with |
Type Definitions
Captures | Opaque type for a function’s captures |
RecordClassId | Numeric ID indicating which class the record belongs to |
ThunkEntry | Entry point for executing a function |