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§
Sourcefn manifest_key_output_pairs(&self) -> &'a [(&'a str, &'a str)]
fn manifest_key_output_pairs(&self) -> &'a [(&'a str, &'a str)]
Get array of (key, output_filename) pairs.
Array must be sorted by key
Sourcefn manifest_chunks(
&self,
) -> &'a [(&'a str, &'a ManifestChunk<&'static str, &'static [&'static str], &'static [u8]>)]
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
fn boxed(&self) -> Box<dyn Manifest<'a>>
Provided Methods§
Sourcefn resolve_output(&self, key: &str) -> Option<&'a str>
fn resolve_output(&self, key: &str) -> Option<&'a str>
Get output_filename from manifest key.
Sourcefn chunk(
&self,
output: &str,
) -> Option<&'a ManifestChunk<&'static str, &'static [&'static str], &'static [u8]>>
fn chunk( &self, output: &str, ) -> Option<&'a ManifestChunk<&'static str, &'static [&'static str], &'static [u8]>>
Get ManifestChunk from output filename.
Sourcefn chunk_by_key(
&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]>>
Get ManifestChunk from manifest key.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".