Expand description
Link CLI Library - Core functionality for links manipulation
This library provides the core data structures and functionality for the link-cli tool, implementing a doublet storage system with LiNo notation support.
§Modules
Every module is public: clink is one front end over this library, and an
application that needs a different one should be able to reach the same
pieces rather than reimplement them.
link- The core Link data structureerror- Error types for link operationslino_link- LiNo link representationparser- LiNo notation parserlink_storage- Persistent link storagestorage- Reusable storage traits and the doublets-backed storechanges_simplifier- Changes simplificationquery_processor- LiNo query processingquery_types- Patterns and resolved links, the shapes a query passes throughlink_reference_validator- Checking, and optionally creating, referenced linksnamed_type_links- The storage interface every layer is written againstnamed_types,pinned_types- Named and pinned type decoratorspersistent_transformations- Persistent transformation triggerstransactions,version_control- Reversible transitions, branches and tagscli- Argument parsing, so a custom tool can accept the same options
§Extending
NamedTypeLinks is the seam: every layer of the stack is written against
it, and every decorator both implements it and wraps another implementation
of it. A layer of your own – a cache, an access check, a remote store –
implements the trait and slots in anywhere, including under
QueryProcessor, which never learns what is beneath it.
Re-exports§
pub use changes_simplifier::simplify_changes;pub use error::LinkError;pub use hybrid_reference::external_reference;pub use hybrid_reference::external_reference_value;pub use hybrid_reference::HybridReference;pub use link::DoubletsLink;pub use link::GenericLink;pub use link::Link;pub use link_storage::LinkStorage;pub use link_storage_doublets::link_storage_constants;pub use lino_database_input::import_lino_file;pub use lino_database_input::import_lino_text;pub use lino_link::LinoLink;pub use named_links::NamedLinks;pub use named_type_links::NamedTypeLinks;pub use named_types::NamedTypes;pub use named_types::NamedTypesDecorator;pub use parser::Parser;pub use persistent_transformations::make_triggers_database_filename;pub use persistent_transformations::PersistentTransformation;pub use persistent_transformations::PersistentTransformationDecorator;pub use persistent_transformations::PersistentTransformationKind;pub use persistent_transformations::PersistentTransformationQuery;pub use persistent_transformations::TriggerStore;pub use persistent_transformations::INTERNAL_NAME_PREFIX;pub use pinned_types::PinnedTypes;pub use pinned_types::PinnedTypesAccess;pub use pinned_types::PinnedTypesDecorator;pub use query_options::QueryOptions;pub use query_processor::QueryProcessor;pub use storage::lock_file_path;pub use storage::DoubletsStorage;pub use storage::FileLock;pub use storage::FileMappedUnitStore;pub use storage::LinksStorage;pub use storage::LinksStorageRef;pub use storage::LockMode;pub use storage::PersistentFileMapped;pub use storage::ResolvedFileMappedUnitStore;pub use storage::StorageRevision;pub use transactions::CommitMode;pub use transactions::DoubletLink;pub use transactions::FileTransitionLog;pub use transactions::GenericDoubletLink;pub use transactions::GenericTransactionsDecorator;pub use transactions::GenericTransition;pub use transactions::LogRetentionPolicy;pub use transactions::TransactionHandle;pub use transactions::TransactionsDecorator;pub use transactions::Transition;pub use transactions::TransitionKind;pub use transactions::TransitionLogStore;pub use unicode_string_storage::UnicodeStringStorage;pub use version_control::BranchInfo;pub use version_control::VersionControlDecorator;pub use version_control::DEFAULT_BRANCH_NAME;pub use doublets;
Modules§
- changes_
simplifier - ChangesSimplifier - Simplifies a list of changes
- cli
- Command-line argument parsing for the
clinkbinary. - decorators
- The upstream
doubletsdecorator layer, re-exported so downstream crates can stack decorators onto aDoubletsStoragethroughDoubletsStorage::map_storewithout depending ondoubletsdirectly (and without risking a version mismatch). Zero-cost decorators that add policy to anyDoubletsstore. - error
- Error types for link operations
- hybrid_
reference Platform.Data.Hybrid<uint>-compatible reference encoding.- link
- Link - A doublet (source, target) pair with an index
- link_
reference_ validator - Checking that every link a query refers to exists, and creating the ones that do not when the caller asked for that.
- link_
storage - LinkStorage - Persistent storage for links
- link_
storage_ doublets - Bridge between the CLI’s
LinkStorageand the upstreamdoubletstraits. - lino_
database_ input - LiNo database import helpers.
- lino_
link - LinoLink - A parsed LiNo link structure
- named_
links - Link-backed names facade matching the C#
NamedLinks<uint>role. - named_
type_ links NamedTypeLinks, the storage interface every layer of the CLI is written against, and its implementations for the plain store and for each decorator.- named_
types - Named type decorator for Rust link storage.
- parser
- LiNo Parser - Parses LiNo notation into LinoLink structures.
- persistent_
transformations - Persistent transformation triggers.
- pinned_
types - Pinned type allocation compatible with the C#
PinnedTypeshelper. - query_
options - The options one query is processed with.
- query_
processor - QueryProcessor - Handles LiNo query parsing and execution
- query_
processor_ substitution - The substitution half of
QueryProcessor: turning a matched restriction plus a substitution pattern into the links to write. - query_
types - The intermediate shapes a query passes through: the
Patterna restriction or substitution parses into, and theResolvedLinka pattern becomes once its variables are bound. - sequences
- Rust ports of the
Data.Doublets.Sequencesabstractions used by C#. - storage
- Reusable storage layer: traits, a doublets-backed implementation and advisory locking helpers.
- transactions
- Optional transactions layer for the Rust link-cli.
- unicode_
string_ storage - Unicode string and name storage backed by doublet links.
- version_
control - Optional version-control layer for the Rust link-cli.