futuresdr_types/
block_id.rs

1use serde::Deserialize;
2use serde::Serialize;
3
4/// Block identifier
5#[derive(Default, Debug, Copy, Clone, PartialEq, Eq, Serialize, Deserialize)]
6pub struct BlockId(pub usize);
7
8impl<'a> From<&'a BlockId> for BlockId {
9    fn from(p: &'a BlockId) -> Self {
10        *p
11    }
12}
13impl From<usize> for BlockId {
14    fn from(item: usize) -> Self {
15        BlockId(item)
16    }
17}