pub trait OffsetSize {
// Required methods
fn offset(&self) -> Offset;
fn size(&self) -> Size;
// Provided methods
fn start(&self) -> Offset { ... }
fn end(&self) -> Offset { ... }
}Expand description
A trait for types that span a range with an offset and size
This trait is implemented by types that represent a contiguous range of data with a starting offset and a size. It provides methods to access the start, end, and size of the span.