Struct treefmt::eval_cache::CacheManifest [−][src]
pub struct CacheManifest { pub formatters: BTreeMap<FormatterName, FormatterInfo>, pub matches: BTreeMap<FormatterName, BTreeMap<PathBuf, Mtime>>, }
RootManifest
Fields
formatters: BTreeMap<FormatterName, FormatterInfo>
Map of all the formatter infos
matches: BTreeMap<FormatterName, BTreeMap<PathBuf, Mtime>>
Map of all the formatted paths
Implementations
impl CacheManifest
[src]
impl CacheManifest
[src]pub fn try_load(cache_dir: &Path, treefmt_toml: &Path) -> Result<Self>
[src]
pub fn try_load(cache_dir: &Path, treefmt_toml: &Path) -> Result<Self>
[src]Loads the manifest and returns an error if it failed
#[must_use]pub fn load(cache_dir: &Path, treefmt_toml: &Path) -> Self
[src]
#[must_use]pub fn load(cache_dir: &Path, treefmt_toml: &Path) -> Self
[src]Always loads the manifest. If an error occured, log and return an empty manifest.
pub fn try_write(self, cache_dir: &Path, treefmt_toml: &Path) -> Result<()>
[src]
pub fn try_write(self, cache_dir: &Path, treefmt_toml: &Path) -> Result<()>
[src]Seralizes back the manifest into place.
pub fn write(self, cache_dir: &Path, treefmt_toml: &Path)
[src]
pub fn write(self, cache_dir: &Path, treefmt_toml: &Path)
[src]Seralizes back the manifest into place.
pub fn update_formatters(
&mut self,
formatters: BTreeMap<FormatterName, Formatter>
)
[src]
pub fn update_formatters(
&mut self,
formatters: BTreeMap<FormatterName, Formatter>
)
[src]Checks and inserts the formatter info into the cache. If the formatter info has changed, invalidate all the old paths.
#[must_use]pub fn filter_matches(
&self,
matches: BTreeMap<FormatterName, BTreeMap<PathBuf, Mtime>>
) -> BTreeMap<FormatterName, BTreeMap<PathBuf, Mtime>>
[src]
#[must_use]pub fn filter_matches(
&self,
matches: BTreeMap<FormatterName, BTreeMap<PathBuf, Mtime>>
) -> BTreeMap<FormatterName, BTreeMap<PathBuf, Mtime>>
[src]Returns a new map with all the paths that haven’t changed
pub fn add_results(
&mut self,
matches: BTreeMap<FormatterName, BTreeMap<PathBuf, Mtime>>
)
[src]
pub fn add_results(
&mut self,
matches: BTreeMap<FormatterName, BTreeMap<PathBuf, Mtime>>
)
[src]Merge recursively the new matches with the existing entries in the cache
Trait Implementations
impl Clone for CacheManifest
[src]
impl Clone for CacheManifest
[src]impl Debug for CacheManifest
[src]
impl Debug for CacheManifest
[src]impl Default for CacheManifest
[src]
impl Default for CacheManifest
[src]impl<'de> Deserialize<'de> for CacheManifest
[src]
impl<'de> Deserialize<'de> for CacheManifest
[src]fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]Deserialize this value from the given Serde deserializer. Read more
impl Serialize for CacheManifest
[src]
impl Serialize for CacheManifest
[src]Auto Trait Implementations
impl RefUnwindSafe for CacheManifest
impl Send for CacheManifest
impl Sync for CacheManifest
impl Unpin for CacheManifest
impl UnwindSafe for CacheManifest
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
pub fn vzip(self) -> V
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,