Skip to main content

nwnrs_resmemfile/
lib.rs

1#![forbid(unsafe_code)]
2#![doc = "# nwnrs-resmemfile\n\nIn-memory `nwnrs-resman::ResContainer` implementation.\n\n## Why This Crate Exists\n\nDownloaded or synthetically generated payloads need to enter the resource\nlookup chain without touching the filesystem. Without an in-memory container,\ncallers would need to write bytes to a temporary file just to create a\n`ResFile`. This crate lets any byte buffer participate in a `ResMan` lookup\nchain directly.\n\n## Scope\n\n- wrap a byte buffer as a single resource entry\n- expose synthetic or downloaded payloads through the same container interface\n  as on-disk resources\n\n## See also\n\n- [`nwnrs-resman`](https://docs.rs/nwnrs-resman), which defines the\n  `ResContainer` abstraction this crate implements\n- [`nwnrs-resfile`](https://docs.rs/nwnrs-resfile), the on-disk equivalent for\n  single-file resources\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::{
13        ResMemFile, ResMemFileError, ResMemFileResult, read_resmemfile, read_resmemfile_arc,
14    };
15}