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 StaticManifestChunk)];
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 StaticManifestChunk> { ... }
fn chunk_by_key(&self, output: &str) -> Option<&'a StaticManifestChunk> { ... }
}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 StaticManifestChunk)]
fn manifest_chunks(&self) -> &'a [(&'a str, &'a StaticManifestChunk)]
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 StaticManifestChunk>
fn chunk(&self, output: &str) -> Option<&'a StaticManifestChunk>
Get ManifestChunk from output filename.
Sourcefn chunk_by_key(&self, output: &str) -> Option<&'a StaticManifestChunk>
fn chunk_by_key(&self, output: &str) -> Option<&'a StaticManifestChunk>
Get ManifestChunk from manifest key.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".