pub struct RangeRequest {
pub offset: u64,
pub len: u64,
}Expand description
The decoder asking for bytes of the source.
This is the record the whole design turns on. The decoder says which bytes it needs and the host decides how to get them, which is what keeps file handles, caching, prefetching, object store credentials and retry policy on the host side of the boundary where they can be fixed without recompiling anybody’s decoder.
Fields§
§offset: u64Where the wanted bytes start in the source.
len: u64How many bytes are wanted.
Implementations§
Source§impl RangeRequest
impl RangeRequest
Sourcepub fn decode(version: u16, p: &mut Reader<'_>) -> Result<Self>
pub fn decode(version: u16, p: &mut Reader<'_>) -> Result<Self>
Reads the record from its payload.
§Errors
Returns Error::UnsupportedVersion if the layout version is not one this build knows, or
Error::Truncated if the payload ends early.
Trait Implementations§
Source§impl Clone for RangeRequest
impl Clone for RangeRequest
Source§fn clone(&self) -> RangeRequest
fn clone(&self) -> RangeRequest
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for RangeRequest
Source§impl Debug for RangeRequest
impl Debug for RangeRequest
impl Eq for RangeRequest
Source§impl PartialEq for RangeRequest
impl PartialEq for RangeRequest
impl StructuralPartialEq for RangeRequest
Auto Trait Implementations§
impl Freeze for RangeRequest
impl RefUnwindSafe for RangeRequest
impl Send for RangeRequest
impl Sync for RangeRequest
impl Unpin for RangeRequest
impl UnsafeUnpin for RangeRequest
impl UnwindSafe for RangeRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more