Returns the offset that this offset was created with. Note that positions created with `FilePos::none` and the `Default` implementation will return `None` here, whereas positions created with `FilePos::new` will return `Some`.
(self)
| 48 | /// implementation will return `None` here, whereas positions created with |
| 49 | /// `FilePos::new` will return `Some`. |
| 50 | pub fn file_offset(self) -> Option<u32> { |
| 51 | if self.0 == u32::MAX { |
| 52 | None |
| 53 | } else { |
| 54 | Some(self.0) |
| 55 | } |
| 56 | } |
| 57 | } |
| 58 | |
| 59 | impl Default for FilePos { |
no outgoing calls
no test coverage detected