source_vtf/lib.rs
1#![forbid(unsafe_code)]
2
3//! Pure Rust access to Valve Texture Format files
4//!
5//! Reads PC VTF 7.0 through 7.5 without copying: thumbnails, resources and every mip, frame, face and slice are slices of the original bytes
6
7mod cursor;
8mod error;
9mod header;
10mod image;
11mod vtf;
12
13pub use error::{Error, Result};
14pub use header::{Header, Resource, ResourceLocation, ResourceTag, TextureFlags, Version};
15pub use image::{ImageFormat, RawImage};
16pub use vtf::Vtf;
17
18/// A [`Vtf`] that owns its underlying byte buffer in heap memory.
19///
20/// Returned by [`Vtf::open`]. Unlike borrowed [`Vtf`] instances, this owns its file bytes
21/// and can be stored in long-lived caches or sent across threads without lifetime parameters.
22pub type OwnedVtf = Vtf<'static>;