pub struct CacheBuilder {
pub cache_path: String,
pub base_file_name: String,
pub calculate_crc32: bool,
}
Fields§
§cache_path: String
§base_file_name: String
§calculate_crc32: bool
Implementations§
Source§impl CacheBuilder
impl CacheBuilder
pub fn new() -> Self
Sourcepub fn with_path(self, path: &str) -> Self
pub fn with_path(self, path: &str) -> Self
Sets the path to the cache folder. Note: this must be a path to a folder, not a file.
Sourcepub fn with_base_filename(self, filename: &str) -> Self
pub fn with_base_filename(self, filename: &str) -> Self
Sets the base name for cache files. Default is “main_file_cache”
Sourcepub fn calculate_crc32(self, calculate: bool) -> Self
pub fn calculate_crc32(self, calculate: bool) -> Self
Decides whether or not to calculate crc sums for archives. Defaults to true.
pub fn build(self) -> Arc<Mutex<Cache>>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CacheBuilder
impl RefUnwindSafe for CacheBuilder
impl Send for CacheBuilder
impl Sync for CacheBuilder
impl Unpin for CacheBuilder
impl UnwindSafe for CacheBuilder
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