doc for file::Chunk
This commit is contained in:
parent
f573b61ad1
commit
c609f51c6a
1 changed files with 4 additions and 0 deletions
|
|
@ -27,18 +27,22 @@ impl<'t> Chunk<'t> {
|
|||
}
|
||||
}
|
||||
|
||||
/// get a reference to the associated `file_id`
|
||||
pub fn get_file_id(&self) -> &sharry::FileID {
|
||||
&self.file_id
|
||||
}
|
||||
|
||||
/// get the chunk's offset
|
||||
pub fn get_offset(&self) -> u64 {
|
||||
self.offset
|
||||
}
|
||||
|
||||
/// get a reference to the associated data
|
||||
pub fn get_data(&self) -> &[u8] {
|
||||
self.data
|
||||
}
|
||||
|
||||
/// get the chunk's length
|
||||
pub fn get_length(&self) -> u64 {
|
||||
let len = self.data.len();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue