Expand description
Values as compiled code holds them: every value fits in a 64-bit Slot.
An int is its two’s-complement bits, a float its IEEE bits, a bool 0 or 1, and a
string, list or struct a pointer to a reference-counted object. Zero in a slot of one of
those types means “no value yet”, and retaining or releasing it does nothing. Lists and
structs share their contents until a copy is changed, so values keep value semantics.
Re-exports§
pub use crate::symbols::BOOL;pub use crate::symbols::FLOAT;pub use crate::symbols::INT;pub use crate::symbols::STRING;
Structs§
- List
Object 🔒 - String
Object 🔒 - Struct
Object 🔒 - Type
Desc - A type, as a compiled program describes it. Struct types may lead back to themselves through their fields, so these form a graph of statics.
- Value 🔒
- A value the runtime owns, released when dropped.
Enums§
Statics§
- LIST_
OF_ 🔒STRINGS [string], the type of the paths a file dialog answers with and of what is dropped.
Functions§
- as_list 🔒
- as_str 🔒
- The text of a string slot that someone owns for
'a. - as_
struct 🔒 - borrow 🔒 ⚠
- The object a slot holds, borrowed for as long as the slot keeps it alive.
- equal 🔒
- Whether two values of type
tyare equal, as==decides. - from_
slot 🔒 ⚠ - Takes the object a slot owns.
- int 🔒
- int_
slot 🔒 - into_
slot 🔒 - The slot holding an object, which the slot now owns.
- list_
mut 🔒 - Makes the list in
placeits only owner’s, copying it if shared, and returns it. - list_
slot 🔒 - A list of type
tyholdingitems, which it takes ownership of. - pointer 🔒
- release 🔒
- Removes an owner from the value in
slot, freeing it with its last owner. - retain 🔒
- Adds an owner to the value in
slot. - string_
slot 🔒 - strings_
slot 🔒 - A
[string]holdingtexts, in order. - struct_
mut 🔒 - unique 🔒
- write 🔒
- Writes a value of type
tyas it reads inside an interpolated string. - write_
items 🔒