doc for file::Chunk

This commit is contained in:
Jörn-Michael Miehe 2025-07-06 00:02:10 +00:00
parent f573b61ad1
commit 72cfe04af1

View file

@ -27,18 +27,22 @@ impl<'t> Chunk<'t> {
} }
} }
/// get a reference to the associated file_id
pub fn get_file_id(&self) -> &sharry::FileID { pub fn get_file_id(&self) -> &sharry::FileID {
&self.file_id &self.file_id
} }
/// get the chunk's offset
pub fn get_offset(&self) -> u64 { pub fn get_offset(&self) -> u64 {
self.offset self.offset
} }
/// get a reference to the associated data
pub fn get_data(&self) -> &[u8] { pub fn get_data(&self) -> &[u8] {
self.data self.data
} }
/// get the chunk's length
pub fn get_length(&self) -> u64 { pub fn get_length(&self) -> u64 {
let len = self.data.len(); let len = self.data.len();