Trait btlib::SeekFromExt
source · pub trait SeekFromExt {
// Required method
fn abs<F, G>(&self, curr: F, end: G) -> Result<u64>
where F: FnOnce() -> Result<u64>,
G: FnOnce() -> Result<u64>;
// Provided methods
fn abs_no_end<F>(&self, curr: F) -> Result<u64>
where F: FnOnce() -> Result<u64> { ... }
fn whence_offset(whence: u32, offset: u64) -> Result<SeekFrom> { ... }
}Required Methods§
sourcefn abs<F, G>(&self, curr: F, end: G) -> Result<u64>where
F: FnOnce() -> Result<u64>,
G: FnOnce() -> Result<u64>,
fn abs<F, G>(&self, curr: F, end: G) -> Result<u64>where F: FnOnce() -> Result<u64>, G: FnOnce() -> Result<u64>,
Returns the absolute position (offset from the start) this SeekFrom refers to.
curr is called in the case this SeekFrom is Current, and is expected to return the
current position.
end is called in the case this SeekFrom is End, and is expected to return the
the position of the end.
Provided Methods§
sourcefn abs_no_end<F>(&self, curr: F) -> Result<u64>where
F: FnOnce() -> Result<u64>,
fn abs_no_end<F>(&self, curr: F) -> Result<u64>where F: FnOnce() -> Result<u64>,
Like SeekFromExt::abs except that an error is always returned when SeekFrom::End is given.