Skip to main content

Crate nwnrs_resfile

Crate nwnrs_resfile 

Source
Expand description

§nwnrs-resfile

Single-file nwnrs-resman::ResContainer implementation.

§Why This Crate Exists

Tools occasionally need to inject a single file into a ResMan lookup chain — for example, a lone NWScript standard library or a standalone blueprint. Without a single-file ResContainer, callers would need a temporary directory or a custom container type. This crate provides the minimal wrapper so any file can be surfaced through the standard resource interface.

§Scope

  • wrap one on-disk file as a single resource entry
  • expose that entry through the same ResContainer abstraction used elsewhere

§See also

  • nwnrs-resman, which defines the ResContainer abstraction this crate implements
  • nwnrs-resdir, which provides the directory-backed equivalent for scanning multiple files

Modules§

prelude
Common imports for consumers of this crate.

Structs§

ResFile
A single file exposed as a one-entry resource container.

Enums§

ResFileError
Errors returned while reading a single-file resource container.

Functions§

read_resfile
Reads a resource file using its filename-derived resource reference.
read_resfile_as
Reads a resource file with an explicit resource reference override.

Type Aliases§

ResFileResult
Result type for single-file resource operations.