pub struct CodeGenerator { /* private fields */ }Expand description
Code generator for workflows
Implementations§
Source§impl CodeGenerator
impl CodeGenerator
Sourcepub fn new(config: CodeGenerationConfig) -> Self
pub fn new(config: CodeGenerationConfig) -> Self
Create a new code generator
Sourcepub fn language(&self) -> &CodeLanguage
pub fn language(&self) -> &CodeLanguage
Get the code generation language
Sourcepub fn include_comments(&self) -> bool
pub fn include_comments(&self) -> bool
Check if comments are included
Sourcepub fn generate_code(
&mut self,
workflow: &WorkflowDefinition,
) -> SklResult<GeneratedCode>
pub fn generate_code( &mut self, workflow: &WorkflowDefinition, ) -> SklResult<GeneratedCode>
Generate code from workflow definition
Sourcepub fn convert_name(&self, name: &str, convention: &NamingConvention) -> String
pub fn convert_name(&self, name: &str, convention: &NamingConvention) -> String
Convert name according to naming convention
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CodeGenerator
impl RefUnwindSafe for CodeGenerator
impl Send for CodeGenerator
impl Sync for CodeGenerator
impl Unpin for CodeGenerator
impl UnwindSafe for CodeGenerator
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
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