Skip to main content

ppt_rs/opc/
shared.rs

1//! Shared OPC utilities
2
3/// Represents a relationship between parts
4#[derive(Debug, Clone)]
5pub struct Relationship {
6    pub rel_id: String,
7    pub rel_type: String,
8    pub target_ref: String,
9    pub target_mode: Option<String>,
10}
11
12impl Relationship {
13    /// Create a new Relationship
14    pub fn new(rel_id: String, rel_type: String, target_ref: String) -> Self {
15        Relationship {
16            rel_id,
17            rel_type,
18            target_ref,
19            target_mode: None,
20        }
21    }
22
23    /// Set the target mode (e.g., "External")
24    pub fn with_target_mode(mut self, mode: String) -> Self {
25        self.target_mode = Some(mode);
26        self
27    }
28}