pub struct Build { /* private fields */ }Expand description
A build, configured.
Implementations§
Source§impl Build
impl Build
Sourcepub fn new() -> Result<Build>
pub fn new() -> Result<Build>
A build of the crate cargo is compiling: CARGO_MANIFEST_DIR for the
corpus, OUT_DIR for the outputs.
Sourcepub fn at(root: impl Into<PathBuf>, out_dir: impl Into<PathBuf>) -> Build
pub fn at(root: impl Into<PathBuf>, out_dir: impl Into<PathBuf>) -> Build
A build of the corpus at root, writing to out_dir.
Sourcepub fn source_locale(self, locale: impl Into<String>) -> Build
pub fn source_locale(self, locale: impl Into<String>) -> Build
Overrides mf2.toml’s source_locale.
Sourcepub fn config(self, config: Config) -> Build
pub fn config(self, config: Config) -> Build
Uses this configuration instead of reading mf2.toml.
Sourcepub fn features(self, features: Features) -> Build
pub fn features(self, features: Features) -> Build
Uses this feature set instead of reading CARGO_FEATURE_*.
Sourcepub fn facade(self, path: impl Into<String>) -> Build
pub fn facade(self, path: impl Into<String>) -> Build
The crate path the generated module re-exports as __mf2
(::mf2). A test with a stub facade names its own.
Sourcepub fn emit(self, emit: Emit) -> Build
pub fn emit(self, emit: Emit) -> Build
What to write (the default is Emit::Both).
Sourcepub fn emit_cargo(self, emit: bool) -> Build
pub fn emit_cargo(self, emit: bool) -> Build
Prints cargo::rerun-if-changed and cargo::warning lines.
Sourcepub fn manifest_inline(self, inline: bool) -> Build
pub fn manifest_inline(self, inline: bool) -> Build
Bakes the manifest’s bytes into the tr! wrapper instead of its
path (plans/05-tooling.md §4): every expansion is then independent
of where the target directory lives, which is what remote execution
and a relocated CI cache need. It costs macro time and manifest size
× call sites in the generated module, so it is opt-in (P0.9:
+0.5 s per 2,000 sites).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Build
impl RefUnwindSafe for Build
impl Send for Build
impl Sync for Build
impl Unpin for Build
impl UnsafeUnpin for Build
impl UnwindSafe for Build
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