[][src]Struct bat::assets_metadata::AssetsMetadata

pub struct AssetsMetadata { /* fields omitted */ }

Implementations

impl AssetsMetadata[src]

pub fn load_from_folder(path: &Path) -> Result<Option<Self>>[src]

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[src]

Trait Implementations

impl Debug for AssetsMetadata[src]

impl Default for AssetsMetadata[src]

impl<'de> Deserialize<'de> for AssetsMetadata[src]

impl PartialEq<AssetsMetadata> for AssetsMetadata[src]

impl Serialize for AssetsMetadata[src]

impl StructuralPartialEq for AssetsMetadata[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.