Expand description
Read-only reader for installed-package metadata, help databases, and selected CRAN-like repository indexes in R’s RDS serialization format.
parse reads a decompressed XDR serialization stream. file provides
the bounded standalone-file entry layer, including supported compression
envelopes.
See the crate README for the concrete repository-index profiles covered by deterministic fixtures and verified manually against real files.
This crate is scoped to installed-R-package information and selected
CRAN-like repository indexes. Strict decoding rejects unknown SEXP values.
inspection observes prefix facts without claiming full object
validity. RObject/RValue are a
supported advanced API with encapsulated fields and non-exhaustive enums;
consumers must include wildcard match arms. The typed package views and
general matrix::CharacterMatrix view are the stable convenience surface.
parse accepts only decompressed XDR,
while file::from_bytes accepts raw XDR, gzip, xz, bzip2, and zstd
envelopes when enabled. Default resource limits are depth 5,000, vectors
8,000,000 elements, 16,000,000 total elements and references, and 256 MiB
file inputs.
Modules§
- file
- Bounded standalone RDS file reading.
- inspection
- Bounded inspection of a decompressed XDR serialization stream.
- matrix
- Validated, owned views of R character matrices.
- package
- Typed access to installed-package metadata, installed code databases, and CRAN-like repository indexes.
Structs§
- Attribute
- Attributes
- Byte
Cursor - A read-only cursor over an in-memory byte slice.
- Header
- The serialized RDS stream header.
- Limits
- Parse
Options - Options controlling decompressed RDS parsing.
- Persisted
- RObject
- RStr
Value - The opaque payload of an
RStr::Valuestring. - RVersion
- An R version encoded in the serializer’s packed
major * 65536 + minor * 256 + patchform. - Symbol
- A symbol whose print name is decoded eagerly during parsing, so it always holds valid text.
Enums§
- EnvHandle
- An opaque handle to an environment.
- Error
- Decode errors produced by
rd-rds. - Native
Encoding Policy - Controls how a native CHARSXP is interpreted when the RDS header field is
absent, which means format 2. Parsing retains bytes lazily for
RStrvalues: conversion bycrate::RStr::as_stror a typed view then performs validation or rejection. ASYMSXPprint name is converted during parsing instead, so a symbol name that cannot be decoded fails immediately withcrate::Error::InvalidSymbolNameunder either policy. - Native
Encoding Source - The source of native-encoding context used to interpret an R string.
- REncoding
- RStr
- RValue
- Sexp
Kind
Functions§
- parse
- parse_
with_ limits - parse_
with_ options - Parses a decompressed XDR stream with explicit options.