Struct bat_impl::assets_metadata::AssetsMetadata
source · [−]pub struct AssetsMetadata { /* private fields */ }
Implementations
sourceimpl AssetsMetadata
impl AssetsMetadata
sourcepub fn load_from_folder(path: &Path) -> Result<Option<Self>>
pub fn load_from_folder(path: &Path) -> Result<Option<Self>>
Load metadata about the stored cache file from the given folder.
There are several possibilities:
- We find a metadata.yaml file and are able to parse it => return the contained information
- We find a metadata.yaml file and but are not able to parse it => return a SerdeYamlError
- We do not find a metadata.yaml file but a syntaxes.bin or themes.bin file => assume that these were created by an old version of bat and return AssetsMetadata::default() without version information
- We do not find a metadata.yaml file and no cached assets => no user provided assets are available, return None
pub fn is_compatible_with(&self, current_version: &str) -> bool
Trait Implementations
sourceimpl Debug for AssetsMetadata
impl Debug for AssetsMetadata
sourceimpl Default for AssetsMetadata
impl Default for AssetsMetadata
sourcefn default() -> AssetsMetadata
fn default() -> AssetsMetadata
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for AssetsMetadata
impl<'de> Deserialize<'de> for AssetsMetadata
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl PartialEq<AssetsMetadata> for AssetsMetadata
impl PartialEq<AssetsMetadata> for AssetsMetadata
sourcefn eq(&self, other: &AssetsMetadata) -> bool
fn eq(&self, other: &AssetsMetadata) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &AssetsMetadata) -> bool
fn ne(&self, other: &AssetsMetadata) -> bool
This method tests for !=
.
sourceimpl Serialize for AssetsMetadata
impl Serialize for AssetsMetadata
impl StructuralPartialEq for AssetsMetadata
Auto Trait Implementations
impl RefUnwindSafe for AssetsMetadata
impl Send for AssetsMetadata
impl Sync for AssetsMetadata
impl Unpin for AssetsMetadata
impl UnwindSafe for AssetsMetadata
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more