cimstructs/
DiagramObjectGluePoint.rs1#[derive(Debug, Default, Clone, serde::Serialize, serde::Deserialize)]
3pub struct DiagramObjectGluePoint {
4 pub id: String,
5}
6impl crate::base::CimElement for DiagramObjectGluePoint {
7 fn mrid(&self) -> &str { &self.id }
8 fn type_name(&self) -> &'static str { "DiagramObjectGluePoint" }
9 fn as_any(&self) -> &dyn std::any::Any { self }
10 fn to_json_value(&self) -> serde_json::Value {
11 serde_json::to_value(self).unwrap_or(serde_json::Value::Null)
12 }
13 fn to_block(&self) -> crate::base::RdfBlock {
14 let block = crate::base::RdfBlock {
15 type_name: "DiagramObjectGluePoint".to_string(),
16 mrid: self.id.clone(),
17 fields: std::collections::HashMap::new(),
18 duplicate_fields: std::collections::HashSet::new(),
19 };
20 block
21 }
22}
23
24impl DiagramObjectGluePoint {
25 pub fn from_block(b: &crate::base::RdfBlock) -> Self {
26 let mut obj = Self::default();
27 obj.id.clone_from(&b.mrid);
28 obj
29 }
30}