Skip to main content

Crate r_packages

Crate r_packages 

Source
Expand description

Lossless, failure-tolerant access to R repository PACKAGES files.

Parsing never rejects DCF syntax. Use Packages::validate when semantic findings are wanted, and the typed methods on PackageRecord when only a particular field should be interpreted.

Individual records convert losslessly to r_description::Description via Description::from(&record). Convert back with PackageRecord::try_from(&description), which requires exactly one record (see RecordConversionError). Both conversions also accept owned values.

Structs§

Finding
One record-indexed validation finding and its document byte span.
FormatStyle
Formatting choices used by canonical builders.
PackageRecord
A transient view of one package record.
Packages
A persistent, lossless parse of zero or more repository package records.
PackagesBuilder
A builder for a zero-or-more-record PACKAGES file.
RecordBuilder
Builds structurally valid DCF with checked initial package and version fields. Full semantic validation remains explicit, including for duplicate fields.

Enums§

BuildError
An invalid value supplied to a structural builder.
EditError
A failure to apply an immutable structured edit.
FindingKind
A stable category of syntax or package-record validation finding.
LineEnding
A physical line-ending convention.
RecordConversionError
A DESCRIPTION document cannot be represented as a single package record.

Functions§

parse
Parses UTF-8 text into a lossless Packages value.
parse_utf8
Parses bytes into Packages after validating UTF-8.