Skip to main content

Crate rd_rds

Crate rd_rds 

Source
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. Unknown SEXP values are hard errors, never silently accepted. 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 256 MiB file inputs.

Modules§

file
Bounded standalone RDS file reading.
matrix
Validated, owned views of R character matrices.
package
Typed access to an installed package’s Meta/package.rds metadata.

Structs§

Attribute
Attributes
ByteCursor
A read-only cursor over an in-memory byte slice.
Header
The serialized RDS stream header.
Limits
ParseOptions
Options controlling decompressed RDS parsing.
Persisted
RObject
RStrValue
The opaque payload of an RStr::Value string.
RVersion
An R version encoded in the serializer’s packed major * 65536 + minor * 256 + patch form.
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.
NativeEncodingPolicy
Controls how a native CHARSXP is interpreted when the RDS header field is absent, which means format 2. Parsing retains bytes lazily for RStr values: conversion by crate::RStr::as_str or a typed view then performs validation or rejection. A SYMSXP print name is converted during parsing instead, so a symbol name that cannot be decoded fails immediately with crate::Error::InvalidSymbolName under either policy.
NativeEncodingSource
The source of native-encoding context used to interpret an R string.
REncoding
RStr
RValue
SexpKind

Functions§

parse
parse_with_limits
parse_with_options
Parses a decompressed XDR stream with explicit options.