Skip to main content

Crate babbel_toml

Crate babbel_toml 

Source
Expand description

§Babbel TOML

Fast, modular, pure-Rust TOML v1.0.0 parser, serializer, streaming pull parser, and DOM.

Complies with the TOML v1.0.0 specification and integrates with babbel_core and the Babbel ecosystem.

Re-exports§

pub use engine::TomlEngine;
pub use error::TomlError;
pub use nodes::DatetimeKind;
pub use nodes::Node;
pub use nodes::TomlDatetime;
pub use parser::Lexer;
pub use parser::Parser;
pub use parser::TomlPullEvent;
pub use parser::TomlPullParser;
pub use stringify::PrettyOptions;
pub use stringify::emit_pretty_to;
pub use stringify::emit_to;
pub use stringify::to_bencode;
pub use stringify::to_bencode_bytes;
pub use stringify::to_json;
pub use stringify::to_json_string;
pub use stringify::to_xml;
pub use stringify::to_xml_string;
pub use stringify::to_yaml;
pub use stringify::to_yaml_string;

Modules§

engine
Format engine implementation adhering to OCP and DIP TOML Format Engine adhering to OCP and DIP.
error
TOML error diagnostics and error conversion.
nodes
TOML DOM node structures, datetimes, and accessor traits.
parser
TOML parsing, tokenization, and streaming pull parsing.
stringify
TOML serialization and formatting modules.

Structs§

BufferSource
In-memory byte vector input source supporting both binary byte streaming and Unicode UTF-8 character streaming.
FileDestination
File output destination writing to a buffered file on disk (32KB write buffer).
FileSource
File input source reading binary or text data from disk.

Traits§

ICharStream
Minimal character reading interface adhering to ISP (Interface Segregation Principle).
IDestination
Interface for writing data to an output destination.
ISource
Standard sequential character reading source trait (LSP & backward compatibility).

Functions§

from_slice
Parses a TOML formatted byte slice into a Node::Table.
from_str
Parses a TOML formatted UTF-8 string into a Node::Table.
from_stream
Parses a character stream into a Node::Table.
to_string
Serializes a Node structure to a TOML string.
to_string_pretty
Serializes a Node structure to a pretty-printed TOML string.
to_vec
Serializes a Node structure to a TOML byte vector.
to_writer
Serializes a Node structure into a destination buffer or stream.

Type Aliases§

BufferDestination
Type alias for backward compatibility.