Expand description
Contains the runtime and core library for the Koto language
Re-exports§
pub use koto_derive as derive;
Modules§
- core_
lib - The core library for the Koto language
- prelude
- A collection of useful items to make it easier to work with
koto_runtime
Macros§
- make_
ptr - Makes a Ptr, with support for casting to trait objects
- make_
ptr_ mut - Makes a PtrMut, with support for casting to trait objects
- runtime_
error - Creates a crate::Error from a message (with format-like behaviour), wrapped in
Err
Structs§
- Borrow
- An immutably borrowed reference to a value borrowed from a PtrMut
- Borrow
Mut - A mutably borrowed reference to a value borrowed from a PtrMut
- Buffered
File - A combination of BufReader and BufWriter
- Call
Context - The context provided when a call to a KNativeFunction is made
- Default
Stderr - The default stderr used in Koto
- Default
Stdin - The default stdin used in Koto
- Default
Stdout - The default stdout used in Koto
- Display
Context - A helper for converting Koto values to strings
- Error
- An error thrown by the Koto runtime
- Instruction
Frame - A chunk and instruction pointer in a call stack where an error was thrown
- KCell
- A mutable value with borrowing checked at runtime
- KFunction
- A Koto function
- KIterator
- The iterator value type used in Koto
- KList
- The List type used by the Koto runtime
- KMap
- The core hash map value type used in Koto, containing a ValueMap and a MetaMap
- KNative
Function - An function that’s defined outside of the Koto runtime
- KObject
- A
KotoObject
wrapper used in the Koto runtime - KRange
- The integer range type used by the Koto runtime
- KString
- The String type used by the Koto runtime
- KTuple
- The Tuple type used by the Koto runtime
- KotoVm
- The Koto runtime’s virtual machine
- Koto
VmSettings - The configurable settings that should be used by the Koto runtime
- MetaMap
- The meta map used by KMap
- Method
Context - Context provided to a function that implements an object method
- Ptr
- An immutable pointer to a value in allocated memory
- Value
Key - The key type used by ValueMap
- Value
Map - The (ValueKey -> Value) ‘data’ hash map used by the Koto runtime
Enums§
- Binary
Op - The binary operations that can be implemented in a MetaMap
- Call
Args - Function call arguments
- Error
Kind - The different error types that can be thrown by the Koto runtime
- IsIterable
- An enum that indicates to the runtime if a
KotoObject
is iterable - KIterator
Output - The output type for iterators in Koto
- KNumber
- The Number type used by the Koto runtime
- KValue
- The core Value type for Koto
- MetaKey
- The key type used by
MetaMaps
- Return
OrYield - An output value from KotoVm::continue_running, either from a
return
oryield
expression - UnaryOp
- The unary operations that can be implemented in a MetaMap
Traits§
- Koto
Copy - A trait for defining how objects should behave when copied in the Koto runtime
- Koto
Entries - A trait that allows objects to support ‘.’ accesses
- Koto
Field - A trait that represents the basic requirements of fields in a type that implements
KotoObject
- Koto
File - A trait used for file-like-things in Koto
- Koto
Function - A trait for native functions used by the Koto runtime
- Koto
Iterator - The trait used to implement iterators in Koto
- Koto
Object - A trait for implementing objects that can be added to the Koto runtime
- Koto
Read - A trait that defines the read operations of a KotoFile
- Koto
Send - An empty trait for single-threaded contexts, implemented for all types
- Koto
Sync - An empty trait for single-threaded contexts, implemented for all types
- Koto
Type - A trait for specifying a Koto object’s type
- Koto
Write - A trait that defines the write operations of a KotoFile
- Module
Imported Callback - The trait used by the ‘module imported’ callback mechanism
Functions§
- unexpected_
args - Creates an unexpected arguments error containing the provided arguments
- unexpected_
args_ after_ instance - Creates an unexpected arguments error containing the provided instance and arguments
- unexpected_
type - Creates an error that describes a type mismatch
Type Aliases§
- Koto
Hasher - The hasher used throughout the Koto runtime
- PtrMut
- A mutable pointer to a value in allocated memory
- Result
- The Result type used by the Koto Runtime
- Value
Vec - The underlying
Vec
type used by KList