Skip to main content

Module value

Module value 

Source

Structs§

ClassValue
The definition of a user-defined class, held in the interpreter’s class registry (not as a Value — variables hold a lightweight Value::Class handle that names this entry).
DataclassField
A single field of an @dataclass-decorated class.
DefaultDictData
Backing data for Value::DefaultDict — the entries + the missing-key factory. Stored behind a Box on the DefaultDict variant so the inline Value enum slot stays narrow.
ExceptionValue
A runtime exception value that can be raised and caught by user code.
FunctionDef
Stored representation of a user-defined function (def). Captures closure at DEFINITION time.
FunctionParams
Function parameter specification.
InstanceValue
A user-defined class instance: its class name plus its own attributes.
LambdaDef
Stored representation of a lambda.
LruCacheData
Shared state for Value::LruCache.
MatchGroup
One capture group of a MatchValue: its text and character span.
MatchValue
A regex match: its capture groups (index 0 is the whole match) plus a name→index map for named groups. Offsets are character indices, matching Python’s str-based re.
Param
A single function parameter.
PartialData
Backing data for Value::Partial — the bound callable + its captured positional / keyword args. Stored behind a Box on the Partial variant so the inline Value enum slot stays narrow.
PropertyDef
A @property data descriptor.

Enums§

BoundMethodReceiver
The receiver of a Value::BoundMethod.
BoundMethodStep
One accessor in a BoundMethodReceiver::Place chain.
EnumKind
Enum kind drives EnumMember equality + arithmetic semantics.
Value
The dynamic value type flowing through the interpreter.
ValueKey
Dict keys must be hashable — a subset of Value.

Functions§

int_from_bigint
Build a Python int value, using Value::Int when it fits in i64.
shared_fields
Construct a fresh SharedFields map.
shared_list
Construct a fresh SharedList from a Vec<Value>. Centralised so call sites use this instead of inlining Arc::new(Mutex::new(v)).
value_as_bigint
Lift a Python numeric value to BigInt (int / bigint / bool).
value_as_i64
Narrow to i64 when the value is a small int (or bool).

Type Aliases§

SharedFields
Shared instance-field map backing InstanceValue::fields.
SharedList
Shared, interior-mutable list storage backing Value::List.