pub struct ProjectBuilder { /* private fields */ }Expand description
Programmatic, dependency-free construction of a Project.
Unlike Project::load, this needs no Cargo.toml,
no cargo metadata, and no TOML parsing: a caller that already holds the
package facts supplies them directly. The scope, name and version are
required; every other field defaults.
Implementations§
Source§impl ProjectBuilder
impl ProjectBuilder
Sourcepub fn git_url(self, git_url: impl Into<String>) -> Self
pub fn git_url(self, git_url: impl Into<String>) -> Self
npm git URL recorded in the meta package.json repository field.
pub fn description(self, description: impl Into<String>) -> Self
Author entry in Name <email> form.
pub fn license(self, license: impl Into<String>) -> Self
Sourcepub fn repository(self, repository: impl Into<String>) -> Self
pub fn repository(self, repository: impl Into<String>) -> Self
Raw repository URL exposed to manifest substitution.
Sourcepub fn bin(self, bin: impl Into<String>) -> Self
pub fn bin(self, bin: impl Into<String>) -> Self
Cargo bin name to build and ship; defaults to the package name.
Sourcepub fn package(self, package: impl Into<String>) -> Self
pub fn package(self, package: impl Into<String>) -> Self
Cargo package passed as --package to the build.
Sourcepub fn workspace_root(self, workspace_root: impl Into<PathBuf>) -> Self
pub fn workspace_root(self, workspace_root: impl Into<PathBuf>) -> Self
Root the payload and manifest sources are read from, and where the build runs.
Sourcepub fn target_directory(self, target_directory: impl Into<PathBuf>) -> Self
pub fn target_directory(self, target_directory: impl Into<PathBuf>) -> Self
Cargo target directory the compiled binaries are copied from.
Trait Implementations§
Source§impl Clone for ProjectBuilder
impl Clone for ProjectBuilder
Source§fn clone(&self) -> ProjectBuilder
fn clone(&self) -> ProjectBuilder
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ProjectBuilder
impl RefUnwindSafe for ProjectBuilder
impl Send for ProjectBuilder
impl Sync for ProjectBuilder
impl Unpin for ProjectBuilder
impl UnsafeUnpin for ProjectBuilder
impl UnwindSafe for ProjectBuilder
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