Skip to main content

Manifest

Trait Manifest 

Source
pub trait Manifest<'a> {
    // Required methods
    fn manifest_key_output_pairs(&self) -> &'a [(&'a str, &'a str)];
    fn manifest_chunks(
        &self,
    ) -> &'a [(&'a str, &'a ManifestChunk<&'static str, &'static [&'static str], &'static [u8]>)];
    fn boxed(&self) -> Box<dyn Manifest<'a>>;

    // Provided methods
    fn resolve_output(&self, key: &str) -> Option<&'a str> { ... }
    fn chunk(
        &self,
        output: &str,
    ) -> Option<&'a ManifestChunk<&'static str, &'static [&'static str], &'static [u8]>> { ... }
    fn chunk_by_key(
        &self,
        output: &str,
    ) -> Option<&'a ManifestChunk<&'static str, &'static [&'static str], &'static [u8]>> { ... }
}
Expand description

Trait, that helps query chunks in Vite manifest.

See Manifest derive and ManifestChunk.

Required Methods§

Source

fn manifest_key_output_pairs(&self) -> &'a [(&'a str, &'a str)]

Get array of (key, output_filename) pairs.

Array must be sorted by key

Source

fn manifest_chunks( &self, ) -> &'a [(&'a str, &'a ManifestChunk<&'static str, &'static [&'static str], &'static [u8]>)]

Get ManifestChunks as (output_filename, chunk) pairs.

Array must be sorted by output_filename

Source

fn boxed(&self) -> Box<dyn Manifest<'a>>

Provided Methods§

Source

fn resolve_output(&self, key: &str) -> Option<&'a str>

Get output_filename from manifest key.

Source

fn chunk( &self, output: &str, ) -> Option<&'a ManifestChunk<&'static str, &'static [&'static str], &'static [u8]>>

Get ManifestChunk from output filename.

Source

fn chunk_by_key( &self, output: &str, ) -> Option<&'a ManifestChunk<&'static str, &'static [&'static str], &'static [u8]>>

Get ManifestChunk from manifest key.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§