Trait DirEntry

Source
pub trait DirEntry {
    // Required methods
    fn from(file: &mut File) -> Result<Self, String>
       where Self: Sized;
    fn write(&self, file: &mut File) -> Result<(), String>;
    fn get_preload_length(&self) -> usize;
}
Expand description

Trait for common methods on the various directory entry formats used in versions of VPK files.

Required Methods§

Source

fn from(file: &mut File) -> Result<Self, String>
where Self: Sized,

Reads a directory entry from a file.

Source

fn write(&self, file: &mut File) -> Result<(), String>

Write the directory entry to a file.

Source

fn get_preload_length(&self) -> usize

Returns the number of bytes of preload data for an entry, this is 0 if all the data is stored in archives.

Implementors§

Source§

impl DirEntry for VPKDirectoryEntryRespawn

Available on crate feature revpk only.
Source§

impl DirEntry for VPKDirectoryEntry