Expand description
Binary links notation version 1: packets and the marker-point LiNo mapping.
Wire specification and shared vectors live in docs/protocol/ in the
repository. This module supplies codecs; transports supply their own framing.
use links_notation::binary::{parse_document, BinaryLinoCodec};
let document = parse_document("() ((1 1))")?;
let codec = BinaryLinoCodec::new();
let bytes = codec.encode(&document)?;
assert_eq!(codec.decode(&bytes)?, document);Re-exports§
pub use packet::ArityRange;pub use packet::DecodeLimits;pub use packet::LinksPacket;pub use packet::Reference;pub use packet::Section;
Modules§
- packet
- Binary links notation: a self-delimiting packet of links.
Structs§
- Binary
Lino Codec - Convenience codec for complete LiNo packets.
- Binary
Lino Options - Optional features of the binary LiNo protocol.
Enums§
- Binary
Error - A failure while encoding or decoding a packet or LiNo document.
Functions§
- canonical
- Converts a parsed link into the canonical model: an unnamed group holding
exactly one reference is that reference, so
aand(a)both parse as the referencea. links-notation (since 0.17) and its C# port keep that wrapper; removing it gives both ports the same document model. - decode_
document - Converts a packet back into a document.
- encode_
document - Converts a document into a packet.
- encode_
document_ with_ limits - Converts a native model into a packet using caller-selected work budgets.
- format_
document - Formats a document as canonical LiNo text, one top-level link per line.
- format_
link - Formats one link as it appears nested inside another link.
- format_
reference - Quotes a reference when it would not survive parsing as a bare word.
- parse_
document - Parses LiNo text into a canonical document. Blank input is the empty document.
Type Aliases§
- Binary
Result - Result returned by the binary codecs.
- Lino
Document - A LiNo document: the list of top-level links of a message.