pub struct NamespaceMetadata { /* private fields */ }Expand description
Owned typed declarations from an installed package’s Meta/nsInfo.rds.
The fields are independent: an invalid S3 matrix does not prevent valid
declared exports from being read. The declarations are retained in input
order and duplicates are not removed. They describe static namespace
declarations only; they do not promise runtime exports, stored bindings,
regex evaluation, re-exports, or .onLoad additions.
Implementations§
Source§impl NamespaceMetadata
impl NamespaceMetadata
Sourcepub fn read_installed(
package_dir: impl AsRef<Path>,
) -> Result<Self, InstalledMetadataError>
pub fn read_installed( package_dir: impl AsRef<Path>, ) -> Result<Self, InstalledMetadataError>
Reads and validates Meta/nsInfo.rds below an installed package
directory.
Sourcepub fn read_installed_with_options(
package_dir: impl AsRef<Path>,
options: &ReadOptions,
) -> Result<Self, InstalledMetadataError>
pub fn read_installed_with_options( package_dir: impl AsRef<Path>, options: &ReadOptions, ) -> Result<Self, InstalledMetadataError>
Reads and validates Meta/nsInfo.rds with explicit file and decode
bounds.
Sourcepub fn from_object(object: &RObject) -> Result<Self, ViewError>
pub fn from_object(object: &RObject) -> Result<Self, ViewError>
Parses an owned view of a named Meta/nsInfo.rds list.
The root must be a named list. Unknown fields are ignored. Duplicate
known fields make only that field Invalid, allowing other fields to
remain useful to callers.