pub struct Loader { /* private fields */ }
Expand description
The tf2 asset loader instance
Implementations§
Source§impl Loader
impl Loader
Sourcepub fn new() -> Result<Self, LoaderError>
pub fn new() -> Result<Self, LoaderError>
Create the loader, either auto-detecting the tf2 directory or from the TF_DIR
environment variable.
Sourcepub fn with_tf2_dir<P: AsRef<Path>>(tf2_dir: P) -> Result<Self, LoaderError>
pub fn with_tf2_dir<P: AsRef<Path>>(tf2_dir: P) -> Result<Self, LoaderError>
Create the loader with the specified tf2 directory.
Sourcepub fn add_source<S: AssetSource + Send + Sync + 'static>(&mut self, source: S)
pub fn add_source<S: AssetSource + Send + Sync + 'static>(&mut self, source: S)
Add a new source to the loader.
This is intended to be used to add data from bsp files
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Loader
impl !RefUnwindSafe for Loader
impl Send for Loader
impl Sync for Loader
impl Unpin for Loader
impl !UnwindSafe for Loader
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more