#[non_exhaustive]pub struct Outcome {
pub manifest_hash: u64,
pub report: Report,
pub locales: Vec<LocaleInfo>,
pub source_locale: String,
pub written: Vec<PathBuf>,
pub removed: Vec<PathBuf>,
pub generated: String,
pub catalogs_module: String,
pub out_dir: PathBuf,
/* private fields */
}Expand description
What a build produced.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.manifest_hash: u64Its hash — what the wasm and every catalog agree on.
report: ReportEverything the build has to say.
locales: Vec<LocaleInfo>The locale table the generated module carries.
source_locale: StringThe source locale.
written: Vec<PathBuf>The files whose bytes changed (and were written).
removed: Vec<PathBuf>Old catalogs removed.
generated: StringThe generated Rust module’s source.
catalogs_module: StringThe catalog table’s source, when the build emits it apart
(Emit::Catalogs); empty otherwise.
out_dir: PathBufWhere the outputs went.
Implementations§
Source§impl Outcome
impl Outcome
Sourcepub fn into_result(self) -> Result<Outcome>
pub fn into_result(self) -> Result<Outcome>
The outcome if the corpus was clean, else the error a build script fails with — the report is printed before it, as warnings and errors.
Sourcepub fn publish(&self, dir: &Path) -> Result<Published>
pub fn publish(&self, dir: &Path) -> Result<Published>
Writes what a static host serves into dir: every catalog under its
content-hashed name (with its .br and .gz, when the build
compressed them) and index.json, {"<tag>": "<file name>", …},
which a client-only application reads to find them. Nothing else —
not the manifest, not the generated module — so the whole directory
can be published as it is. Catalogs an earlier publish left in dir
are removed; each file is written only when its bytes change.
The catalogs are immutable and may be cached forever; the index is
not, and a host should serve it no-cache.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Outcome
impl RefUnwindSafe for Outcome
impl Send for Outcome
impl Sync for Outcome
impl Unpin for Outcome
impl UnsafeUnpin for Outcome
impl UnwindSafe for Outcome
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more