Crate foundation_wasm

Source

Modules§

exposed_runtime
exposed_runtime are the underlying functions we expose to the host from the system. These are functions the runtime exposes to the host to be able to make calls into the system or triggering processes.
host_runtime
host_runtime is the expected interface which the JS/Host must provide for use with wrapper functions that make it simple and easier to interact with.
internal_api
internal_api are internal methods, structs, and surfaces that provide core functionalities that we support or that allows making or preparing data to be sent-out or sent-across the API.
value_quantitization
[value_quantitzation] contains various quantitzation methods which exists to take different unit value types returning a more compact representation of those values with a lesser unit type where possible.

Structs§

CachedText
[CachedText8] defines a instance of a cached UTF-8 text at some specific location managed by the host runtime identified by the wrapped u64 id.
CallParams
CompletedInstructions
ExternalPointer
ExternalPointer identifies an external handle pointing to a special pointer that is used to control/access an external resource.
FnCallback
FnDoTask
FnFrameCallback
FnIntervalCallback
FrameCallbackList
GroupReturnTypeHints
GroupReturnTypeHints represents conversion of underlying type which is a grouping of return values from the host where it represent a batch of return values that should be generated/materialized.
Instructions
Instructions is a one batch set writer, meaning it encodes a single batch of instruction marked by a Operations::Begin and Operations::Stop markers when the Instructions::end is called.
InternalPointer
InternalPointer identifies an external handle pointing to a special pointer that is used to control/access an external resource.
InternalReferenceRegistry
IntervalCallbackList
IntervalRegistry
MemoryAllocation
MemoryAllocation is a thread-safe and copy-cheap handle to a underlying memory location held by a Vec<u8>.
MemoryAllocations
MemoryId
MemoryId represents a key to a allocation ’ which has a unique generation to denote it’s ownership if the generation differs from the current generation of a given index then that means ownership was already lost and hence cant be used.
MemoryLocation
MemoryLocation represents a location in memory where the first value is a pointer to the memory location and the next is the length of the value.
MemoryPointer
MemoryPointer holds references memory ids for both text and operations.
MemorySlot
MemorySlot provides a nicer API handle for memory allocation representing one that contains ops code represented as a Vec<u8> and text represent by a Vec<u8> of a utf-8 encoded text.
ScheduleRegistry
StrLocation
StrLocation represent the underlying location of an encoded string which points to the relevant starting index and length from that index location, this then can be applied to any valid memory address that contains the texts to find the relevant portion.
TaskErrorCode
TaskErrorCode represents the converted response of an ReturnValues::ErrorCode when its communicated that a async task or function failed.
WrappedItem

Enums§

ArgumentOperations
ArgumentOperations representing the argument layout in memory used to represent the different argument blocks a function is to receive.
BinaryReadError
GroupReturnHintMarker
GuestOperationError
JSEncoding
JSEncoding defines a defining type to help indicate the underlying encoding for a giving text body.
MemOpError
MemoryAllocationError
MemoryReaderError
MemoryWriterError
Operations
Lists all possible encodable operations supported by this crate. This allows us represent different actions and operations with a 1 byte pointer in the range of 0 - 255 (a u8, 8 bits).
ParamTypeId
ParamTypeId represent the underlying type of value being encoded into a binary stream.
Params
ReturnEncoded
ReturnEncoded represent the type indicating the underlying returned value for an operation.
ReturnHintMarker
ReturnIds
ReturnIds represent the type indicating the underlying returned value for an operation.
ReturnTypeHints
ReturnTypeHints represent the potential return values of calling a function
ReturnTypeId
[ReturnValueTypes] represent the type indicating the underlying returned value for an operation.
ReturnValueError
ReturnValueMarker
ReturnValues
Returns
Returns represent the potential return values of calling a function
ThreeState
ThreeState represent the fact that some operation can be a single state or two or three states (think: Option & Result<T> or Result<Option<T>>) and we wish to be able to express that clear to users.
ThreeStateId
ThreeStateId represent the type indicating the underlying returned value for an operation.
TickState
TypeOptimization
TypeOptimization represent potential type optimization that can happen to types represented as a single u8 (max of 255) numbers. This allows us declare within the format any potential optimization and space saving operation that might have occurred for a giving type, informing the HOST side about so it can correctly decode the underlying content.
TypedSlice
TypedSlice represent the type of a slice which is sent over. And helps the receiver know what exactly is represented by a slice of u8 array.
WASMErrors

Constants§

MOVE_ONE_BYTE
MOVE_ONE_TWENTY_EIGHT_BYTES
MOVE_SIXTEEN_BYTES
MOVE_SIXTY_FOUR_BYTES
MOVE_THIRTY_TWO_BYTES

Traits§

BatchEncodable
BatchEncodable defines a trait which allows you implement conversion an underlying binary representation of a Batch operation.
Batchable
Batchable defines a infallible type which can be encoded into a BatchEncodable implementing type usually a [Batch].
DoTask
FrameCallback
FromBinary
FromBinary provides a basic type to convert from binary data to the defined T.
InternalCallback
IntervalCallback
ToBinary
ToBinary provides a basic type which we can encode as plain binary bytes usually in LittleIndian encoding.

Type Aliases§

BinaryReaderResult
GuestOperationResult
MemOpResult
MemoryAllocationResult
MemoryReaderResult
MemoryWriterResult
TaskResult
WasmRequestResult