pub enum NoHashCategory<'a> {
    FileExtentions(Vec<&'a str>),
    FilePaths(Vec<&'a str>),
}
Expand description

Items to avoid hash calculation.

This is useful when serving vendor static files which are interlinked, where chaing file names should mean changing how the vendor files pulls its dependencies — which are beyond the abilities of cache_buster.

use cache_buster::NoHashCategory;

let extensions = NoHashCategory::FileExtentions(vec!["wasm"]);
let files = NoHashCategory::FileExtentions(vec!["swagger-ui-bundle.js", "favicon-16x16.png"]);

Variants

FileExtentions(Vec<&'a str>)

vector of file extensions that should be avoided for hash processing

FilePaths(Vec<&'a str>)

list of file paths that should be avoided for file processing

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.