use serde::Deserialize;
use serde::Serialize;
use crate::BlockId;
use crate::PortId;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct FlowgraphDescription {
pub blocks: Vec<BlockDescription>,
pub stream_edges: Vec<(BlockId, PortId, BlockId, PortId)>,
pub message_edges: Vec<(BlockId, PortId, BlockId, PortId)>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct BlockDescription {
pub id: BlockId,
pub type_name: String,
pub instance_name: String,
pub stream_inputs: Vec<String>,
pub stream_outputs: Vec<String>,
pub message_inputs: Vec<String>,
pub message_outputs: Vec<String>,
pub blocking: bool,
}