pub enum RangeCalculation {
Range(Option<Range<u64>>),
TerminateEarly,
}
Expand description
Represents the possible outcomes of a range calculation.
This enum is used to encapsulate the result of calculating the range of bytes to read from an object (like a file) in an object store.
Variants:
Range(Option<Range<usize>>)
: Represents a range of bytes to be read. It contains anOption
wrapping aRange<usize>
.None
signifies that the entire object should be read, whileSome(range)
specifies the exact byte range to read.TerminateEarly
: Indicates that the range calculation determined no further action is necessary, possibly because the calculated range is empty or invalid.
Variants§
Auto Trait Implementations§
impl Freeze for RangeCalculation
impl RefUnwindSafe for RangeCalculation
impl Send for RangeCalculation
impl Sync for RangeCalculation
impl Unpin for RangeCalculation
impl UnwindSafe for RangeCalculation
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more