pub enum ObjectByteRange {
Bounded {
start: u64,
end_exclusive: u64,
},
From {
start: u64,
},
Suffix {
length: u64,
},
}Expand description
One HTTP byte range. Bounded ranges use an exclusive end in Rust and are rendered with the inclusive end required by HTTP.
Variants§
Implementations§
Source§impl ObjectByteRange
impl ObjectByteRange
pub const fn bounded( start: u64, end_exclusive: u64, ) -> Result<Self, ObjectTransferError>
pub const fn from(start: u64) -> Self
pub const fn suffix(length: u64) -> Result<Self, ObjectTransferError>
pub fn to_http_value(self) -> String
pub const fn validate(self) -> Result<(), ObjectTransferError>
Trait Implementations§
Source§impl Clone for ObjectByteRange
impl Clone for ObjectByteRange
Source§fn clone(&self) -> ObjectByteRange
fn clone(&self) -> ObjectByteRange
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 ObjectByteRange
Source§impl Debug for ObjectByteRange
impl Debug for ObjectByteRange
Source§impl<'de> Deserialize<'de> for ObjectByteRange
impl<'de> Deserialize<'de> for ObjectByteRange
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 ObjectByteRange
Source§impl PartialEq for ObjectByteRange
impl PartialEq for ObjectByteRange
Source§impl Serialize for ObjectByteRange
impl Serialize for ObjectByteRange
impl StructuralPartialEq for ObjectByteRange
Auto Trait Implementations§
impl Freeze for ObjectByteRange
impl RefUnwindSafe for ObjectByteRange
impl Send for ObjectByteRange
impl Sync for ObjectByteRange
impl Unpin for ObjectByteRange
impl UnsafeUnpin for ObjectByteRange
impl UnwindSafe for ObjectByteRange
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.