rd_rds/lib.rs
1//! Read-only reader for the subset of R's RDS serialization format used by
2//! installed-package help databases.
3//!
4//! [`parse`] reads a decompressed XDR serialization stream. [`mod@file`] provides
5//! the bounded standalone-file entry layer, including supported compression
6//! envelopes.
7//!
8//! This crate is scoped to installed-R-package information. Unknown SEXP
9//! values are hard errors, never silently accepted. `RObject`/`RValue` are a
10//! supported advanced API with encapsulated fields and non-exhaustive enums;
11//! consumers must include wildcard match arms. The typed [`package`] views and
12//! general [`matrix::CharacterMatrix`] view are the stable convenience surface.
13//! `parse` accepts only decompressed XDR,
14//! while [`file::from_bytes`] accepts raw XDR, gzip, xz, bzip2, and zstd
15//! envelopes when enabled. Default resource limits are depth 5,000, vectors
16//! 8,000,000 elements, 16,000,000 total elements, and 256 MiB file inputs.
17
18mod cursor;
19mod decode;
20mod error;
21pub mod file;
22mod header;
23pub mod matrix;
24pub mod package;
25mod value;
26
27pub use cursor::ByteCursor;
28pub use decode::{parse, parse_with_limits};
29pub use error::Error;
30pub use header::{Header, RVersion};
31pub use value::{
32 Attribute, Attributes, EnvHandle, Limits, Persisted, REncoding, RObject, RStr, RValue,
33 SexpKind, Symbol,
34};