| 185 | /// A file (trunk) with all its lines. |
| 186 | #[derive(Debug, Clone)] |
| 187 | pub struct File { |
| 188 | /// The file's unique identifier. |
| 189 | pub id: TrunkId, |
| 190 | /// The file path. |
| 191 | pub path: String, |
| 192 | /// The file's inode. |
| 193 | pub inode: Inode, |
| 194 | /// The file's lifecycle state. |
| 195 | pub state: TrunkState, |
| 196 | /// The file's encoding (as stored). |
| 197 | pub encoding: u8, |
| 198 | /// The lines in this file. |
| 199 | pub lines: Vec<Line>, |
| 200 | } |
| 201 | |
| 202 | impl File { |
| 203 | /// Creates a new file from serialized trunk data. |