[][src]Crate veriform

Veriform: cryptographically verifiable data serialization format inspired by Protocol Buffers.

This crate provides a no_std-friendly implementation of the format with a zero-copy pull parser.

For more information on Veriform, see the work-in-progress specification: https://github.com/iqlusioninc/veriform/blob/develop/spec/draft-veriform-spec.md

Usage

The main API for encoding and decoding Veriform messages is the Message trait. When the veriform_derive feature of this crate is enabled, custom derive is available for this trait for both structs and enums.

Built-in Types

Veriform has a small "standard library" of so-called "built-in types" which are serialized using message syntax, but in a consistent way which allows different programming language environments to use the best-available native representation for these types.

  • Timestamp: date/time as represented in International Atomic Time (TAI)
  • Uuid: universally unique identifier

Re-exports

pub use digest;
pub use vint64;
pub use crate::encoder::Encoder;
pub use crate::error::Error;
pub use crate::message::Message;

Modules

builtins

Built-in message types: Veriform's "standard library".

decoder

Veriform decoder

derive_helpers

Helper functions called from custom derive output

encoder

Veriform encoder

error

Error types

field

Fields (i.e. key/value pair) in a message

message

Veriform messages

Type Definitions

Decoderfeature="sha2"

Veriform decoder with the default SHA-256 hash

Sha256Digestfeature="sha2"

SHA-256 digests

Derive Macros

Messagefeature="veriform_derive"

Derive the Message trait for an enum or struct.