Skip to main content

Module formats

Module formats 

Source
Expand description

Support the declaration of the binary formats used by an application.

Structs§

Formats
The serde formats used by an application. The exact serde encoding in use must be known separately.
LineraEnvironment
A json_converter environment that decodes the BCS form of well-known linera-base primitives into their human-readable JSON representation (e.g. a CryptoHash as a hex string, an Amount as a decimal string, an AccountOwner as its canonical address).

Enums§

PruneError
An error raised while pruning known primitives from a Formats registry.

Constants§

KNOWN_PRIMITIVE_NAMES
The registry names of the linera-base primitives handled by LineraEnvironment. These are exactly the types whose human-readable serde representation differs from their BCS form and whose BCS form is a named container (so it can be matched by name in a traced registry).

Traits§

BcsApplication
An application using BCS as binary encoding.
StableEnum
Marker trait for enums whose variant tags on the wire are derived from Keccak-256(variant_name). Apply with #[derive(StableEnum)].
StableEnumTrace
Companion trait of StableEnum: exposes each variant’s stable tag and provides the implementation backing TracerExt::trace_stable_enum_type. Implemented by the #[derive(StableEnum)] macro.
TracerExt
Extension methods on Tracer for tracing enums whose variant tags are not contiguous starting at zero.

Derive Macros§

StableEnum
Re-exports the #[derive(StableEnum)] macro for stable-tagged enums. Derive linera_sdk::formats::StableEnum for an enum. Expands to: