Skip to main content

OwnedVtf

Type Alias OwnedVtf 

Source
pub type OwnedVtf = Vtf<'static>;
Expand description

A Vtf that owns its underlying byte buffer in heap memory.

Returned by Vtf::open. Unlike borrowed Vtf instances, this owns its file bytes and can be stored in long-lived caches or sent across threads without lifetime parameters.

Aliased Type§

pub struct OwnedVtf {
    pub header: Header,
    pub resources: Vec<Resource>,
    /* private fields */
}

Fields§

§header: Header§resources: Vec<Resource>

In dictionary order. 7.0-7.2 have no dictionary, there the thumbnail and image come from the fixed layout

Implementations§

Source§

impl OwnedVtf

Source

pub fn open(path: impl AsRef<Path>) -> Result<OwnedVtf>

Reads a whole VTF into memory and parses it