pub struct VisualPipelineBuilder {
pub workflow: WorkflowDefinition,
pub component_positions: HashMap<String, Position>,
pub canvas_config: CanvasConfig,
pub validation_state: ValidationState,
pub history: Vec<WorkflowSnapshot>,
pub history_index: usize,
}Expand description
Visual pipeline builder for creating workflows graphically
Fields§
§workflow: WorkflowDefinitionCurrent workflow being built
component_positions: HashMap<String, Position>Component positioning information
canvas_config: CanvasConfigCanvas configuration
validation_state: ValidationStateValidation state
history: Vec<WorkflowSnapshot>Undo/redo history
history_index: usizeCurrent history index
Implementations§
Source§impl VisualPipelineBuilder
impl VisualPipelineBuilder
Sourcepub fn add_step(&mut self, step: StepDefinition) -> SklResult<()>
pub fn add_step(&mut self, step: StepDefinition) -> SklResult<()>
Add a step to the workflow
Sourcepub fn remove_step(&mut self, step_id: &str) -> SklResult<()>
pub fn remove_step(&mut self, step_id: &str) -> SklResult<()>
Remove a step from the workflow
Sourcepub fn add_connection(&mut self, connection: Connection) -> SklResult<()>
pub fn add_connection(&mut self, connection: Connection) -> SklResult<()>
Add a connection between steps
Sourcepub fn remove_connection(
&mut self,
from_step: &str,
from_output: &str,
to_step: &str,
to_input: &str,
) -> SklResult<()>
pub fn remove_connection( &mut self, from_step: &str, from_output: &str, to_step: &str, to_input: &str, ) -> SklResult<()>
Remove a connection
Sourcepub fn move_component(
&mut self,
step_id: &str,
position: Position,
) -> SklResult<()>
pub fn move_component( &mut self, step_id: &str, position: Position, ) -> SklResult<()>
Move a component to a new position
Sourcepub fn update_step_parameters(
&mut self,
step_id: &str,
parameters: BTreeMap<String, ParameterValue>,
) -> SklResult<()>
pub fn update_step_parameters( &mut self, step_id: &str, parameters: BTreeMap<String, ParameterValue>, ) -> SklResult<()>
Update step parameters
Sourcepub fn validate(&mut self) -> &ValidationState
pub fn validate(&mut self) -> &ValidationState
Validate the current workflow and update the validation state.
This method performs a comprehensive validation pass, updating
[self.validation_state] with the latest errors and warnings. It does
not short-circuit the caller when issues are detected; instead,
callers are expected to inspect the returned ValidationState and
decide whether to proceed.
Sourcepub fn snap_to_grid(&self, position: Position) -> Position
pub fn snap_to_grid(&self, position: Position) -> Position
Snap position to grid
Sourcepub fn get_workflow(&self) -> &WorkflowDefinition
pub fn get_workflow(&self) -> &WorkflowDefinition
Get current workflow
Sourcepub fn get_component_positions(&self) -> &HashMap<String, Position>
pub fn get_component_positions(&self) -> &HashMap<String, Position>
Get component positions
Sourcepub fn get_validation_state(&self) -> &ValidationState
pub fn get_validation_state(&self) -> &ValidationState
Get validation state
Sourcepub fn set_canvas_config(&mut self, config: CanvasConfig)
pub fn set_canvas_config(&mut self, config: CanvasConfig)
Set canvas configuration
Sourcepub fn get_canvas_config(&self) -> &CanvasConfig
pub fn get_canvas_config(&self) -> &CanvasConfig
Get canvas configuration
Trait Implementations§
Source§impl Clone for VisualPipelineBuilder
impl Clone for VisualPipelineBuilder
Source§fn clone(&self) -> VisualPipelineBuilder
fn clone(&self) -> VisualPipelineBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for VisualPipelineBuilder
impl Debug for VisualPipelineBuilder
Source§impl Default for VisualPipelineBuilder
impl Default for VisualPipelineBuilder
Source§impl<'de> Deserialize<'de> for VisualPipelineBuilder
impl<'de> Deserialize<'de> for VisualPipelineBuilder
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for VisualPipelineBuilder
impl RefUnwindSafe for VisualPipelineBuilder
impl Send for VisualPipelineBuilder
impl Sync for VisualPipelineBuilder
impl Unpin for VisualPipelineBuilder
impl UnwindSafe for VisualPipelineBuilder
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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