pub struct Generator<'a> { /* private fields */ }Expand description
Generates the publish tree for one or more Projects into a shared output
root, atomically. Construct with Generator::new (single) or
Generator::for_projects (a workspace’s bins) and configure with the
chained setters.
Implementations§
Source§impl<'a> Generator<'a>
impl<'a> Generator<'a>
Sourcepub fn for_projects(projects: &'a [Project]) -> Self
pub fn for_projects(projects: &'a [Project]) -> Self
Start a generation for several projects (e.g. one per workspace bin) sharing one output root; they are assembled and swapped together.
Sourcepub fn build_driver(self, driver: &'a dyn BuildDriver) -> Self
pub fn build_driver(self, driver: &'a dyn BuildDriver) -> Self
Inject a build driver, overriding the default cargo command. Lets a
library consumer or test supply a custom BuildDriver.
Sourcepub fn no_build(self, no_build: bool) -> Self
pub fn no_build(self, no_build: bool) -> Self
Skip the build phase and assemble from existing binaries.
Sourcepub fn driver(self, driver: impl Into<String>) -> Self
pub fn driver(self, driver: impl Into<String>) -> Self
Build driver invoked per target (e.g. cargo, cross, cargo-zigbuild).
Sourcepub fn targets(
self,
targets: impl IntoIterator<Item = impl Into<String>>,
) -> Self
pub fn targets( self, targets: impl IntoIterator<Item = impl Into<String>>, ) -> Self
Restrict generation to these target keys; empty means all resolved.
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Generator<'a>
impl<'a> !Send for Generator<'a>
impl<'a> !Sync for Generator<'a>
impl<'a> !UnwindSafe for Generator<'a>
impl<'a> Freeze for Generator<'a>
impl<'a> Unpin for Generator<'a>
impl<'a> UnsafeUnpin for Generator<'a>
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
Mutably borrows from an owned value. Read more