graph_process_manager_loggers/stepstrace/
printer.rs

1/*
2Copyright 2020 Erwan Mahe (github.com/erwanM974)
3
4Licensed under the Apache License, Version 2.0 (the "License");
5you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
7
8    http://www.apache.org/licenses/LICENSE-2.0
9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15*/
16
17
18
19use std::path::Path;
20use graph_process_manager_core::process::config::AbstractProcessConfiguration;
21
22use crate::stepstrace::object::ObjectToBuildWhenTracingSteps;
23
24
25pub trait StepsTraceProcessPrinter<Conf : AbstractProcessConfiguration, ObjectToBuild : ObjectToBuildWhenTracingSteps> {
26
27    fn get_initial_object(
28        &self,
29        context_and_param: &Conf::ContextAndParameterization,
30        node: &Conf::DomainSpecificNode
31    ) -> ObjectToBuild;
32
33    fn add_step_to_object(
34        &self,
35        context_and_param: &Conf::ContextAndParameterization,
36        object : &ObjectToBuild,
37        step : &Conf::DomainSpecificStep
38    ) -> ObjectToBuild;
39
40    fn should_print_on_node_reached(
41        &self,
42        context_and_param: &Conf::ContextAndParameterization,
43        node: &Conf::DomainSpecificNode
44    ) -> bool;
45
46    fn print_object(
47        &self,
48        context_and_param: &Conf::ContextAndParameterization,
49        object : &ObjectToBuild,
50        path : &Path
51    );
52}