Skip to main content

Module wit

Module wit 

Source
Expand description

Round-trip conversion between the recursive in-memory schema model in super and the flat, index-based wire types from the golem:core@2.0.0 WIT package.

The wire types themselves are generated in this crate. The active generated module is selected by the mutually-exclusive guest and host features and re-exported through wire.

Modules§

direct
Concrete guest values converted directly to the canonical wire arena.
wire

Structs§

GraphDecoder
Decoder for a single flat wire::SchemaGraph that holds several independent root types (the agent-layer carrier produced by crate::schema::wit::GraphEncoder). Decodes the shared defs once and then any type-node-index into a recursive SchemaType.
GraphEncoder
Incremental builder for a single flat wire::SchemaGraph that holds several independent root types in one shared type-nodes pool.
GuestPermissionCardHandle
GuestQuotaTokenHandle
GuestSecretHandle

Enums§

DecodeError
Errors that can occur while decoding the flat wire form into the recursive in-memory representation.
EncodeError
Errors that can occur while encoding a recursive schema graph / value into the flat wire form.

Functions§

datetime_from_wire
datetime_to_wire
decode_graph
decode_metadata
decode_typed
decode_typed_owned
Decode a typed value on a guest while consuming its wire representation.
decode_value
Decode a value tree on a guest, consuming it so that each quota-token-handle node’s owned own<quota-token> resource can be moved out into an opaque super::GuestQuotaTokenHandle.
encode_graph
encode_metadata
encode_typed
encode_typed_async
encode_typed_owned
Encode a typed guest value while explicitly transferring any affine resources reachable from it into the returned wire representation.
encode_value
Encode a value tree on a guest, transferring each SchemaValue::QuotaToken owned handle into the wire tree as a quota-token-handle node.
encode_value_async
Encode a guest value tree containing arbitrary recursive stream leaves. Native readers are wrapped without reading from them before the normal failure-atomic affine lowering pass transfers all resources at once.
new_schema_value_stream
Create a native Component Model stream carrying schema value trees.
uuid_from_wire
uuid_to_wire