Struct nue_io::Region
[−]
[src]
pub struct Region<T> { // some fields omitted }
Creates an isolated segment of an underlying stream.
Seeks past the region will be capped, and reaching the end of the region will result in EOF when reading or writing.
Methods
impl<T> Region<T>
fn new(inner: T, start: u64, end: u64) -> Self
Creates a new Region
at the specified offsets of inner
.
fn region(&self) -> (u64, u64)
Returns the region bounds.
fn into_inner(self) -> T
Unwraps the Region
to return the inner stream.