pub trait SeekHole {
// Required methods
fn seek_hole(&mut self, offset: u64) -> Result<Option<u64>>;
fn seek_data(&mut self, offset: u64) -> Result<Option<u64>>;
}
Expand description
A trait for seeking to the next hole or non-hole position in a file.
Required Methods§
Sourcefn seek_hole(&mut self, offset: u64) -> Result<Option<u64>>
fn seek_hole(&mut self, offset: u64) -> Result<Option<u64>>
Seek to the first hole in a file.
Seek at a position greater than or equal to offset
. If no holes exist
after offset
, the seek position will be set to the end of the file.
If offset
is at or after the end of the file, the seek position is
unchanged, and None is returned.
Returns the current seek position after the seek or an error.