pub struct SmithyBuild { /* private fields */ }Implementations§
Source§impl SmithyBuild
impl SmithyBuild
pub fn new() -> SmithyBuild
Sourcepub fn path(self, path: impl AsRef<Path>) -> SmithyBuild
pub fn path(self, path: impl AsRef<Path>) -> SmithyBuild
Set the relative path to use as the root for the Smithy build process
The default path for executing the build process is the crate root dir.
Sourcepub fn out_dir<P: AsRef<Path>>(&mut self, out: P) -> &mut SmithyBuild
pub fn out_dir<P: AsRef<Path>>(&mut self, out: P) -> &mut SmithyBuild
Sets the output directory for the Smithy Build.
This is automatically set to $OUT_DIR/smithy or the setting in the smithy-build.json by default.
Most users will not need to change this.
Sourcepub fn projection<T: AsRef<OsStr>>(&mut self, projection: T) -> &mut SmithyBuild
pub fn projection<T: AsRef<OsStr>>(&mut self, projection: T) -> &mut SmithyBuild
Sets the projection to use for the Smithy build.
If unset, the source projection will be used as the default.
Sourcepub fn plugin<T: AsRef<OsStr>>(&mut self, plugin: T) -> &mut SmithyBuild
pub fn plugin<T: AsRef<OsStr>>(&mut self, plugin: T) -> &mut SmithyBuild
Sets a single plugin to build.
If unset, the Smithy build process will build all plugins.
Sourcepub fn model<T: AsRef<PathBuf>>(&mut self, model: T) -> &mut SmithyBuild
pub fn model<T: AsRef<PathBuf>>(&mut self, model: T) -> &mut SmithyBuild
Adds a model file to build discovery path.
By default, any models in the model/ directory are discovered
Sourcepub fn config<T: AsRef<PathBuf>>(&mut self, config: T) -> &mut SmithyBuild
pub fn config<T: AsRef<PathBuf>>(&mut self, config: T) -> &mut SmithyBuild
Add a smithy-build config
If no configs are specified, the build will default to smithy-build.json
config at root of crate.
Sourcepub fn debug(&mut self) -> &mut SmithyBuild
pub fn debug(&mut self) -> &mut SmithyBuild
Enables debug printing in Smithy build output.
By default, the $CARGO_LOG environment variable is scraped to determine
whether to set this or not.
Sourcepub fn format(&mut self) -> &mut SmithyBuild
pub fn format(&mut self) -> &mut SmithyBuild
Enable/Disable automatic formatting of smithy files.
Sourcepub fn quiet(&mut self) -> &mut SmithyBuild
pub fn quiet(&mut self) -> &mut SmithyBuild
Silence output except errors.
Sourcepub fn allow_unknown_traits(&mut self) -> &mut SmithyBuild
pub fn allow_unknown_traits(&mut self) -> &mut SmithyBuild
Ignore unknown traits when validating models.
Sourcepub fn env<K, V>(&mut self, key: K, value: V) -> &mut SmithyBuild
pub fn env<K, V>(&mut self, key: K, value: V) -> &mut SmithyBuild
Configure an environment variable for the Smithy build process.