Skip to main content

Crate oxabl_cache_format

Crate oxabl_cache_format 

Source
Expand description

Byte formats: magic, versions, encode and decode, size limits. Handles no keys.

Every decoder takes untrusted bytes, returns FormatError instead of panicking, checks counts and lengths against limits before allocating, and rejects trailing bytes. Every encoder emits the canonical form that its decoder accepts: decoding and re-encoding gives the same bytes.

Re-exports§

pub use api_token::ApiToken;
pub use commit_request::CommitEntry;
pub use commit_request::CommitRequest;
pub use commit_request::CommitSegment;
pub use commit_request::SegmentKind;
pub use commit_response::CommitResponse;
pub use commit_response::CommitStatus;
pub use dictionary_pointer::DictionaryPointer;
pub use entry_payload::EntryFile;
pub use entry_payload::EntryPayload;
pub use error::FormatError;
pub use error::Result;
pub use ids::CacheId;
pub use ids::LookupId;
pub use ids::PackId;
pub use ids::PublicKey;
pub use ids::RequestId;
pub use ids::SegmentId;
pub use ids::Signature;
pub use ids::TenantId;
pub use limits::Limits;
pub use lookup_request::LookupFlags;
pub use lookup_request::LookupRequest;
pub use lookup_request::LookupShape;
pub use lookup_response::HitRecord;
pub use lookup_response::LookupHit;
pub use lookup_response::LookupResponse;
pub use lookup_response::ResponseDictionary;
pub use lookup_response::ResponsePack;
pub use member_descriptor::MemberDescriptor;
pub use namespace::Namespace;
pub use namespace::Namespaces;
pub use pack_footer::PackFooter;
pub use pack_footer::PackSegment;
pub use pack_header::PackHeader;
pub use pack_trailer::PackTrailer;
pub use record::SealedRecord;
pub use roster::Member;
pub use roster::Role;
pub use roster::Roster;
pub use roster::RosterSignature;
pub use segment::SealedSegment;
pub use segment::SegmentHeader;
pub use segment_plaintext::Codec;
pub use segment_plaintext::SegmentPlaintext;
pub use telemetry::SealedTelemetry;
pub use telemetry::TelemetryKind;
pub use telemetry::TelemetryMode;
pub use telemetry::TelemetryReport;

Modules§

api_token
API token text: oxc_<id>_<secret>.
audience
The client an ID token was issued to, from its aud and azp claims: the one rule that the server, the owner’s client and the CLI apply (OpenID Connect Core 1.0, section 3.1.3.7, items 3 to 5). It lives here because this is the only crate both sides link.
base32
Crockford base32: lowercase, no padding, bytes read as one big-endian integer.
bech32
Bech32 (BIP 173 checksum) without the 90-character limit, lowercase only.
commit_request
OXCM commit request.
commit_response
OXCA commit response.
cursor
dictionary_pointer
OXDP dictionary pointer.
entry_payload
OXEP plaintext of a sealed record.
error
frame
ids
Fixed-length identifiers and their lowercase hex form.
limits
Size limits of the protocol, enforced by every decoder and encoder.
lookup_request
OXLQ lookup request.
lookup_response
OXLR lookup response.
member_descriptor
Public member descriptor string, as member add takes it.
namespace
pack_footer
OXPK pack footer: the segment index.
pack_header
OXPK pack header.
pack_trailer
OXPK pack trailer.
padme
record
OXER sealed record: the outer header.
roster
OXRS roster: members, keyring and owner signatures.
segment
OXSG sealed segment: the outer header and the chunk structure of the body.
segment_plaintext
OXSP plaintext of a segment, after decryption.
telemetry
OXTL sealed telemetry report and the report it carries.
text_ids
Text forms of ids: c_ and t_ ids, and request ids.
writer