pub struct CachedFile {
pub cache: Option<PathBuf>,
pub origin: PathBuf,
pub data: Option<Vec<u8>>,
}
Fields§
§cache: Option<PathBuf>
§origin: PathBuf
§data: Option<Vec<u8>>
Implementations§
Source§impl CachedFile
impl CachedFile
pub fn set_cache_if_missing(&mut self, cache: &str)
pub fn is_loaded(&self) -> bool
pub fn cache(&mut self)
pub fn load_cache(&mut self)
Trait Implementations§
Source§impl Debug for CachedFile
impl Debug for CachedFile
Source§impl Default for CachedFile
impl Default for CachedFile
Source§fn default() -> CachedFile
fn default() -> CachedFile
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CachedFile
impl RefUnwindSafe for CachedFile
impl Send for CachedFile
impl Sync for CachedFile
impl Unpin for CachedFile
impl UnwindSafe for CachedFile
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