graph_process_manager_core 0.4.0

Utilities to explore parts of a tree-like or graph-like structure that is not known in advance
Documentation
/*
Copyright 2020 Erwan Mahe (github.com/erwanM974)

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

use std::sync::Arc;

use super::config::AbstractProcessConfiguration;


pub enum ExplorationEvent<Conf: AbstractProcessConfiguration> {
    /** A new node has been discovered and added to the graph. **/
    NewNode {
        id: u32,
        node: Arc<Conf::DomainSpecificNode>,
    },

    /**
     * A step has been processed (not filtered).
     **/
    NewStep {
        origin_node_id: u32,
        step: Conf::DomainSpecificStep,
        target_node_id: u32
    },

    /**
     * A filter was activated, preventing further exploration from parent_node_id.
     **/
    Filtered {
        parent_node_id: u32,
        filtration_result: Conf::FiltrationResult,
    },

    /** A node has no children (either genuinely terminal or pruned by a filter). **/
    NodeWithoutChildren {
        node_id: u32,
    },

    /** All steps that could be fired from parent_node_id have now been processed. **/
    AllChildrenProcessed {
        parent_node_id: u32,
    },
}