pub struct ImportCache { /* private fields */ }Expand description
Import cache for performance optimization
Implementations§
Source§impl ImportCache
impl ImportCache
Sourcepub fn get_cached_content(&self, path: &str) -> Option<&String>
pub fn get_cached_content(&self, path: &str) -> Option<&String>
Get cached content
Sourcepub fn cache_content(&mut self, path: String, content: String)
pub fn cache_content(&mut self, path: String, content: String)
Cache content
Sourcepub fn get_cached_dependencies(&self, path: &str) -> Option<&Vec<String>>
pub fn get_cached_dependencies(&self, path: &str) -> Option<&Vec<String>>
Get cached dependencies
Sourcepub fn cache_dependencies(&mut self, path: String, dependencies: Vec<String>)
pub fn cache_dependencies(&mut self, path: String, dependencies: Vec<String>)
Cache dependencies
Sourcepub fn get_cached_processed(&self, path: &str) -> Option<&String>
pub fn get_cached_processed(&self, path: &str) -> Option<&String>
Get cached processed content
Sourcepub fn cache_processed(&mut self, path: String, content: String)
pub fn cache_processed(&mut self, path: String, content: String)
Cache processed content
Auto Trait Implementations§
impl Freeze for ImportCache
impl RefUnwindSafe for ImportCache
impl Send for ImportCache
impl Sync for ImportCache
impl Unpin for ImportCache
impl UnwindSafe for ImportCache
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