grapl_ipc_generator_plugin/
lib.rs

1use grapl_graph_descriptions::graph_description::*;
2use grapl_graph_descriptions::*;
3use grapl_graph_descriptions::graph_description::{Static, IdStrategy};
4
5use derive_dynamic_node::{DynamicNode as GraplNode};
6
7pub const IPC_CREATOR: &'static str = "ipc_creator";
8pub const IPC_RECIPIENT: &'static str = "ipc_recipient";
9
10#[derive(Clone, GraplNode)]
11pub struct Ipc {
12    src_pid: u64,
13    dst_pid: u64,
14    ipc_type: String,
15}
16
17pub fn static_strategy() -> IdStrategy {
18    Static {
19        primary_key_properties: vec![
20                    "src_pid".to_string(), "dst_pid".to_string()
21                ],
22        primary_key_requires_asset_id: true,
23    }.into()
24}
25
26impl IIpcNode for IpcNode {
27    fn get_mut_dynamic_node(&mut self) -> &mut DynamicNode {
28        &mut self.dynamic_node
29    }
30}
31
32