pub enum ReadSelection {
Full,
Range {
start: RemoteOffset,
length: ReadLimit,
},
Tail(ReadLimit),
}Expand description
Which bytes one read wants.
Full is [0, inspected_size). Range starts at start and carries at
most length bytes, clamped to the inspected end. Tail names the last
length bytes (the whole file when it is shorter). A selection resolved
against the inspected size yields a RemoteWindow; growth after
inspection is not followed.
Variants§
Trait Implementations§
Source§impl Clone for ReadSelection
impl Clone for ReadSelection
Source§fn clone(&self) -> ReadSelection
fn clone(&self) -> ReadSelection
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 ReadSelection
Source§impl Debug for ReadSelection
impl Debug for ReadSelection
Source§impl<'de> Deserialize<'de> for ReadSelection
impl<'de> Deserialize<'de> for ReadSelection
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ReadSelection
Source§impl Hash for ReadSelection
impl Hash for ReadSelection
Source§impl PartialEq for ReadSelection
impl PartialEq for ReadSelection
Source§impl Serialize for ReadSelection
impl Serialize for ReadSelection
impl StructuralPartialEq for ReadSelection
Auto Trait Implementations§
impl Freeze for ReadSelection
impl RefUnwindSafe for ReadSelection
impl Send for ReadSelection
impl Sync for ReadSelection
impl Unpin for ReadSelection
impl UnsafeUnpin for ReadSelection
impl UnwindSafe for ReadSelection
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