pub struct Composer {
pub config_files: Vec<String>,
pub workflows: RefCell<Vec<Workflow>>,
pub custom_types: RefCell<HashMap<String, String>>,
}
Fields§
§config_files: Vec<String>
§workflows: RefCell<Vec<Workflow>>
§custom_types: RefCell<HashMap<String, String>>
Implementations§
Source§impl Composer
impl Composer
Sourcepub fn add_config(&mut self, config: &str)
pub fn add_config(&mut self, config: &str)
Sourcepub fn add_workflow(
&self,
name: String,
version: String,
tasks: HashMap<String, Task>,
) -> Result<(), Error>
pub fn add_workflow( &self, name: String, version: String, tasks: HashMap<String, Task>, ) -> Result<(), Error>
Adds a new workflow to the composer. This method is invoked by the workflows function inside the starlark_module.
§Arguments
name
- Name of the workflow to be addedversion
- Version of the workflowtasks
- HashMap of tasks associated with the workflowcustom_types
- Optional vector of custom types names that are created within config for the workflow.
§Returns
Result<(), Error>
- Result indicating success if the workflow is added successfully, or an error if the workflow name is empty or if there is a duplicate workflow name.
pub fn build(verbose: bool, temp_dir: &Path) -> Result<(), Error>
Trait Implementations§
Source§impl<'pst> ProvidesStaticType<'pst> for Composer
impl<'pst> ProvidesStaticType<'pst> for Composer
Source§type StaticType = Composer
type StaticType = Composer
Auto Trait Implementations§
impl !Freeze for Composer
impl !RefUnwindSafe for Composer
impl Send for Composer
impl !Sync for Composer
impl Unpin for Composer
impl UnwindSafe for Composer
Blanket Implementations§
Source§impl<'a, T> AnyLifetime<'a> for Twhere
T: ProvidesStaticType<'a> + 'a + ?Sized,
impl<'a, T> AnyLifetime<'a> for Twhere
T: ProvidesStaticType<'a> + 'a + ?Sized,
Source§fn static_type_id() -> TypeId
fn static_type_id() -> TypeId
Must return the
TypeId
of Self
but where the lifetimes are changed
to 'static
. Must be consistent with static_type_of
.Source§fn static_type_of(&self) -> TypeId
fn static_type_of(&self) -> TypeId
Must return the
TypeId
of Self
but where the lifetimes are changed
to 'static
. Must be consistent with static_type_id
. Must not
consult the self
parameter in any way.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
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>
Converts
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>
Converts
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