Crate linera_base

Source
Expand description

This module provides a common set of types and library functions that are shared between the Linera protocol (compiled from Rust to native code) and Linera applications (compiled from Rust to Wasm).

Re-exports§

pub use task::Blocking;

Modules§

abi
This module defines the notion of Application Binary Interface (ABI) for Linera applications across Wasm and native architectures.
command
Command functionality used for spawning child processes.
crypto
Define the cryptographic primitives used by the Linera protocol.
data_types
Core data-types used in the Linera protocol.
dyn_convert
Object-safe conversion traits.
hashed
A wrapper for hashable types to memoize the hash.
http
Types used when performing HTTP requests.
identifiers
Core identifiers used by the Linera protocol.
ownership
Structures defining the set of owners and super owners, as well as the consensus round types and timeouts for chains.
port
Functionality for obtaining some free port.
task
Abstractions over tasks that can be used natively or on the Web.
time
Abstractions over time that can be used natively or on the Web.
tracing
This module provides unified handling for tracing subscribers within Linera binaries.
vm
The virtual machines being supported.

Macros§

bcs_scalar
Defines a GraphQL scalar type using the hex-representation of the value’s BCS-serialized form.
doc_scalar
Defines a GraphQL scalar with a description string.
ensure
A macro for asserting that a condition is true, returning an error if it is not.

Enums§

BcsHexParseError
An error trying to parse the hex-digits of a BCS-encoded value.

Functions§

hex_debug
Formats a byte sequence as a hexadecimal string, and elides bytes in the middle if it is longer than 32 bytes.
hex_vec_debug
Applies hex_debug to a slice of byte vectors.
listen_for_shutdown_signals
Listens for shutdown signals, and notifies the CancellationToken if one is received.