Crate relay_protocol

source ·
Expand description

Types and traits for building JSON-based protocols and schemas

This crate provides the types and aliases that are used for the meta part of the protocol. This is the core annotation system as well as the dynamic value parts and the metadata that goes with it.

§Test Utilities

When the test feature is enabled, this crate exposes the additional assert_annotated_snapshot macro. This can be used with insta to render and compare snapshots of annotated data with meta data.

Re-exports§

Modules§

  • Types to specify conditions on data.

Macros§

Structs§

  • Wrapper for data fields with optional meta data.
  • Borrowed version of Array.
  • An error with an enumerable kind and optional data.
  • Meta information for a data field in the event payload.
  • Represents a tree of meta objects.
  • Borrowed version of Object.
  • Information on a modified section in a string.
  • An utility to serialize annotated objects with payload.
  • Helper type that renders out a description of the value.

Enums§

Traits§

  • A value that can be empty.
  • Implemented for all meta structures.
  • A type that supports field access by paths.
  • Implemented for all meta structures.

Functions§

  • Estimates the size in bytes this would be in JSON.
  • Estimates the size in bytes this would be in JSON, but does not recurse into objects or arrays.
  • Convert T into a Value.

Type Aliases§

  • Alias for typed arrays.
  • Alias for maps.
  • Meta for children.
  • Alias for typed objects.
  • The start (inclusive) and end (exclusive) indices of a Remark.

Derive Macros§