pub struct AssetsManager {
pub index: Index,
pub cache: DecompressionManager,
pub extension_list: Vec<Box<dyn Extension>>,
/* private fields */
}Fields§
§index: Index§cache: DecompressionManager§extension_list: Vec<Box<dyn Extension>>Implementations§
Source§impl AssetsManager
impl AssetsManager
pub fn new(index: Index, cache: DecompressionManager) -> Self
pub fn move_file(&mut self, origin: &str, target: &str) -> Result<()>
pub fn remove_file(&mut self, origin: &str) -> Result<()>
pub fn copy_file(&mut self, origin: &str, target: &str) -> Result<()>
pub fn create_file(&mut self, path: &str) -> Result<()>
pub fn remove_process_pass(&mut self, name: &str)
pub fn add_compression_formats(&mut self, format: &str)
pub fn add_extension(&mut self, extension: Box<dyn Extension>)
pub fn load(&mut self, base_path: &str) -> Result<()>
pub fn unload(&mut self, path: &str, cache_decompressed: bool)
pub fn remove(&mut self, path: &str)
pub fn find_file_index(&self, filename: &str) -> Option<usize>
pub fn find_file_index_using_full_path(&self, path: &str) -> Option<usize>
pub fn get(&mut self, path: &str) -> Option<Vec<u8>>
pub fn get_ref(&mut self, path: &str) -> Option<&Option<Vec<u8>>>
pub fn get_mut(&mut self, path: &str) -> Option<&mut Option<Vec<u8>>>
pub fn set_data(&mut self, path: &str, new_data: Vec<u8>)
pub fn have_file(&self, filename: &str) -> bool
pub fn save(&mut self, filename: &str) -> Result<()>
pub fn get_files_matching_regex(&self, regex: &str) -> Vec<PathBuf>
Trait Implementations§
Source§impl Debug for AssetsManager
impl Debug for AssetsManager
Auto Trait Implementations§
impl Freeze for AssetsManager
impl !RefUnwindSafe for AssetsManager
impl !Send for AssetsManager
impl !Sync for AssetsManager
impl Unpin for AssetsManager
impl !UnwindSafe for AssetsManager
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more