Skip to main content

nwnrs_resfile/
lib.rs

1#![forbid(unsafe_code)]
2#![doc = "# nwnrs-resfile\n\nSingle-file `nwnrs-resman::ResContainer` implementation.\n\n## Why This Crate Exists\n\nTools occasionally need to inject a single file into a `ResMan` lookup chain \u{2014}\nfor example, a lone `NWScript` standard library or a standalone blueprint. Without\na single-file `ResContainer`, callers would need a temporary directory or a\ncustom container type. This crate provides the minimal wrapper so any file can\nbe surfaced through the standard resource interface.\n\n## Scope\n\n- wrap one on-disk file as a single resource entry\n- expose that entry through the same `ResContainer` abstraction used elsewhere\n\n## See also\n\n- [`nwnrs-resman`](https://docs.rs/nwnrs-resman), which defines the\n  `ResContainer` abstraction this crate implements\n- [`nwnrs-resdir`](https://docs.rs/nwnrs-resdir), which provides the\n  directory-backed equivalent for scanning multiple files\n"include_str!("../README.md")]
3
4mod read;
5mod types;
6
7pub use read::*;
8pub use types::*;
9
10/// Common imports for consumers of this crate.
11pub mod prelude {
12    pub use crate::{ResFile, ResFileError, ResFileResult, read_resfile, read_resfile_as};
13}