Skip to main content

Module object

Module object 

Source
Expand description

Heap object layouts and their GC hooks.

Every object starts with a Header. Instances keep their fields inline as atomic words, so a racing reader can never see a torn value. Lists do the same with their elements and swap whole buffers on growth, so their reads never lock. Dicts and other containers keep Rust-side buffers; the ownership rules (and per-object locks for shared objects) guarantee those are never mutated while another thread reads them.

Structs§

AtomicObj
BigIntObj
CellObj
ChannelInner
ChannelObj
ChannelState
ClosureObj
DictObj
InstanceObj
ListBuf
A list’s backing array: a capacity word followed by cap slots. Slots at or past the list’s length always hold nil, so a racing reader that sees a stale length never sees a stale pointer.
ListObj
A list: header, length and a pointer to a backing array.
MutexObj
NativeObj
StrObj
StringBuilderObj
ThreadInner
ThreadObj
TupleObj

Enums§

ThreadOutcome
Outcome of a finished thread: its value or its panic message.

Traits§

NativeData

Functions§

as_atomic⚠
Safety
as_bigint⚠
Safety
as_cell⚠
Safety
as_channel⚠
Safety
as_closure⚠
Safety
as_dict⚠
Safety
as_instance⚠
Safety
as_list⚠
Safety
as_mutex⚠
Safety
as_native⚠
Safety
as_sb⚠
Safety
as_str_obj⚠
Safety
as_thread⚠
Safety
as_tuple⚠
Safety
kind_of
The object kind of a value (Immediate for non-pointers).
mark_value
str_of
Returns the string slice if v is a string.