Skip to main content

Crate structom

Crate structom 

Source
Expand description

the official library for working with structom for the rust language

§structom

structom (StructuredAtoms) is a lightweight general data exchange format designed for universal applications, from small human readable object files to large scale data serialization.

structom has 3 different forms for data representation:

  • object notation: consize human readable systax for data manipulated by humans.
  • binary objects: effecient direct form for shcemaless data.
  • serialized structs: flattern form for performant data serialization.

structom provide additional rich data structures (tagged unions), supports both schema and schemaless data, and provide support for user defined erased metadata for richer data representation.

structom is designed to be very versatile and expressive, while remaining efficient and performant, adapting for any need from high level rich data notation to low level effecient serialization.

read more about the structom format in its specification.

§features

this crate provides the following features for working with structom:

  • parsing and stringifying object notation files.
  • decoding and encoding binary files.
  • manipulating and creating structom values.
  • supports both schema and schemaless data.
  • parsing and managment of decleration files.
  • provide runtime for the serialization code generated by codegen.

this crate supports every feature of the structom specification.

Re-exports§

pub use encoding::Serialized;
pub use encoding::decode;
pub use encoding::encode;

Modules§

encoding
functions and types related to encoding and decoding.

Structs§

DeclFile
encapsulate the content of a decleration file.
FSProvider
provider that loads declerations from the file system.
FixedSetProvider
decleration provider with fixed set of decleration files.
FixedSetProviderRef
decleration provider with fixed set of decleration files.
ParseError
error encountered during parsing.
ParseOptions
parsing options.
StringifyOptions
options for stringify()
VoidProvider
decleration provider with no decleration files.

Enums§

ImportError
error encountered during importing a declaration file.
Key
a type used as Value::Map key.
Value
type representing a structom value.

Traits§

DeclProvider
trait for types providing decleration files.

Functions§

parse
parse structom object notation into a Value.
parse_declaration_file
parse a decleration file into a DeclFile.
stringify
stringify a Value into object notation.