Trait scroll::TryOffset [] [src]

pub trait TryOffset<E = Error, I = usize> {
    fn try_offset<N>(&self, offset: I) -> Result<I, E>;
}

Attempt to add an offset for a given N's size, used to compute error values in Gread, or return the N's size in units the same as the offset

NB: this trait's name is likely to be changed, tweaked slightly, if you are implementing an entire Pread stack, beware this could change

Required Methods

Given the offset, see if a size + offset can safely be performed on Self, and return the resulting computed size

Implementors