SmithyBuild

Struct SmithyBuild 

Source
pub struct SmithyBuild { /* private fields */ }

Implementations§

Source§

impl SmithyBuild

Source

pub fn new() -> SmithyBuild

Source

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.

Source

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.

Source

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.

Source

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.

Source

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

Source

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.

Source

pub fn no_config(&mut self) -> &mut Self

Disable config file detection and use.

Source

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.

Source

pub fn format(&mut self) -> &mut SmithyBuild

Enable/Disable automatic formatting of smithy files.

Source

pub fn quiet(&mut self) -> &mut SmithyBuild

Silence output except errors.

Source

pub fn allow_unknown_traits(&mut self) -> &mut SmithyBuild

Ignore unknown traits when validating models.

Source

pub fn env<K, V>(&mut self, key: K, value: V) -> &mut SmithyBuild
where K: AsRef<OsStr>, V: AsRef<OsStr>,

Configure an environment variable for the Smithy build process.

Source

pub fn execute(&self) -> Result<Output>

Trait Implementations§

Source§

impl Default for SmithyBuild

Source§

fn default() -> SmithyBuild

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.