| 152 | /// ``` |
| 153 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 154 | pub struct Trunk { |
| 155 | /// Globally unique identifier for this file. |
| 156 | id: TrunkId, |
| 157 | |
| 158 | /// Stable filesystem reference that survives renames. |
| 159 | inode: Inode, |
| 160 | |
| 161 | /// Current file path (relative to repository root). |
| 162 | path: String, |
| 163 | |
| 164 | /// Text encoding, if known. |
| 165 | encoding: Option<Encoding>, |
| 166 | |
| 167 | /// Current lifecycle state. |
| 168 | state: TrunkState, |
| 169 | } |
| 170 | |
| 171 | impl Trunk { |
| 172 | /// Creates a new trunk with the given properties. |
no outgoing calls