flowrlib/
debugger_handler.rs1use serde_json::Value;
2
3use flowcore::errors::Result;
4use flowcore::model::input::Input;
5use flowcore::model::output_connection::OutputConnection;
6use flowcore::model::runtime_function::RuntimeFunction;
7
8use crate::block::Block;
9use crate::debug_command::DebugCommand;
10use crate::job::Job;
11use crate::run_state::RunState;
12use crate::run_state::State;
13
14pub trait DebuggerHandler {
20 fn start(&mut self);
22 fn job_breakpoint(&mut self, job: &Job, function: &RuntimeFunction, states: Vec<State>);
24 fn block_breakpoint(&mut self, block: &Block);
26 fn flow_unblock_breakpoint(&mut self, flow_id: usize);
28 #[allow(clippy::too_many_arguments)]
30 fn send_breakpoint(
31 &mut self,
32 source_function_name: &str,
33 source_function_id: usize,
34 output_route: &str,
35 value: &Value,
36 destination_id: usize,
37 destination_name: &str,
38 io_name: &str,
39 input_number: usize,
40 );
41 fn job_error(&mut self, job: &Job);
43 fn job_completed(&mut self, job: &Job);
45 fn blocks(&mut self, blocks: Vec<Block>);
47 fn outputs(&mut self, output: Vec<OutputConnection>);
49 fn input(&mut self, input: Input);
51 fn function_list(&mut self, functions: &[RuntimeFunction]);
53 fn function_states(&mut self, function: RuntimeFunction, function_states: Vec<State>);
55 fn run_state(&mut self, run_state: &RunState);
57 fn message(&mut self, message: String);
59 fn panic(&mut self, state: &RunState, error_message: String);
61 fn debugger_exiting(&mut self);
63 fn debugger_resetting(&mut self);
65 fn debugger_error(&mut self, error: String);
67 fn execution_starting(&mut self);
69 fn execution_ended(&mut self);
71 fn get_command(&mut self, state: &RunState) -> Result<DebugCommand>;
77}