Skip to main content

Module format

Module format 

Source
Expand description

Stable file-format, reader, and in-memory build API.

Re-exports§

pub use crate::ingest::assemble_dataset;
pub use crate::ingest::assemble_dataset_with;
pub use crate::ingest::assemble_dataset_with_opts;
pub use crate::ingest::assemble_dataset_with_opts_algo;
pub use crate::ingest::assemble_dataset_with_perms;
pub use crate::ingest::parse;
pub use crate::ingest::parse_quads;
pub use crate::ingest::parse_rdfxml;
pub use crate::ingest::parse_statements;
pub use crate::ingest::parse_statements_audited_surface;
pub use crate::ingest::parse_turtle;
pub use crate::ingest::parse_turtle_surface;
pub use crate::ingest::BuildStats;
pub use crate::ingest::DeferredMetadata;
pub use crate::ingest::FinalCounts;
pub use crate::ingest::IngestError;
pub use crate::ingest::IntoMetadata;
pub use crate::ingest::QuotedTripleSurface;
pub use crate::ingest::RawQuad;
pub use crate::ingest::RawTriple;

Structs§

BuildInfoPlan
Everything needed to splice a build-info section into a finished file without holding the file in memory: the rewritten header, where the section goes, and where the bytes that do not move resume.
ByteRange
A byte range in the .rete file image.
DumpPlan
What a filtered dump will cost, before it runs — see Rete::dump_plan.
Header
Decoded file header. All multi-byte fields are little-endian on disk. The *_offset / *_len fields are a convenience view over the section directory (populated from it on parse, emitted back to it on serialize).
LayoutSegment
One labelled byte region of a .rete file image (see Rete::file_layout). kind is a stable machine tag: header, metadata, dictionary, directory, tile, pyramid, named-graphs.
Rete
A read-only, in-memory view over a .rete file image.
ScanPlan
What a routed scan of one pattern will touch, from the tile directories alone — see [GraphIndex::scan_plan].
Section
One parsed/encoded section-directory entry: a typed (offset, length) into the file, plus 16 bits of per-section flags (reserved).
TripleProvenance
Why a triple-pattern result is present in the file.

Enums§

FileError
HeaderError
SectionKind
A top-level file section, addressed by SectionKind in the header directory.

Constants§

CODEC_NONE
No compression.
CODEC_ZSTD
zstd compression (per section).
CURRENT_FORMAT_VERSION
Current format generation written by this crate.
HEADER_LEN
Fixed header size in bytes.
MAGIC
Magic bytes at offset 0: ASCII RETE.
MIN_STABLE_READ_VERSION
Oldest stable format generation accepted by this reader.
RDF_TYPE
rdf:type — the predicate that assigns a class to a resource.

Functions§

attach_build_info
Attach (or replace) a build-info section in a finished file image, returning the new image. Layout and hash semantics: plan_build_info.
plan_build_info
Plan the splice of a build-info section of info_len bytes into a file whose first HEADER_LEN bytes are head and whose total length is file_len.
read_build_info
The build-info section of a whole file image, or None if absent. The payload is an opaque application-layer blob (the CLI stores build-conditions JSON there); it is not covered by the content hash — see attach_build_info.
replace_metadata
Replace the metadata section (the Dataset Card blob) of a finished file image, returning the new image. The section is the first one after the header, so every later section’s offset shifts by the length delta.
verify
Recompute the content hash from a file image and check it against the header — detects corruption or truncation of the payload sections.

Type Aliases§

TermTriple
A resolved triple as terms.