Skip to main content

BcsApplication

Trait BcsApplication 

Source
pub trait BcsApplication {
    type Abi;

    // Required method
    fn formats() -> Result<Formats>;

    // Provided method
    fn pruned_formats() -> Result<Formats, PruneError> { ... }
}
Expand description

An application using BCS as binary encoding.

Required Associated Types§

Source

type Abi

Link the public Abi of application for good measure.

Required Methods§

Source

fn formats() -> Result<Formats>

Returns the serde formats for this application’s ABI types. The returned registry is self-contained: it describes every type structurally, including the well-known linera-base primitives.

Provided Methods§

Source

fn pruned_formats() -> Result<Formats, PruneError>

Like formats, but with the well-known linera-base primitives pruned from the registry (see Formats::prune_known_primitives) so that they decode to their human-readable form via LineraEnvironment. This is the form meant to be published to a formats registry.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§