hff_core/
content_info.rs

1/// Information about the metadata or chunk data contained within the source.
2pub trait ContentInfo {
3    /// Length of the data.
4    fn len(&self) -> u64;
5    /// Offset into the overall source.
6    fn offset(&self) -> u64;
7}
8
9// Helper to use content info from provided data.
10// Not all ways of access the chunks will be through the views.
11impl ContentInfo for (u64, u64) {
12    fn len(&self) -> u64 {
13        self.0
14    }
15
16    fn offset(&self) -> u64 {
17        self.1
18    }
19}