Struct echo_library::Composer
source · 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
§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