pub struct ContentRange {
pub unit: String,
pub range: Range,
pub size: String,
pub body: Vec<u8>,
pub content_type: String,
}Expand description
A single body part. Response.content_range_list holds one or more of these.
Build one with Range::get_content_range (in-memory bytes) or
Range::get_content_range_of_a_file (file on disk).
Fields§
§unit: StringRange unit — always "bytes".
range: Range§size: StringTotal resource size as a string.
body: Vec<u8>Raw body bytes.
content_type: StringMIME type for this part. Use MimeType constants or MimeType::detect_mime_type.
Trait Implementations§
Source§impl Clone for ContentRange
impl Clone for ContentRange
Source§fn clone(&self) -> ContentRange
fn clone(&self) -> ContentRange
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 moreSource§impl Debug for ContentRange
impl Debug for ContentRange
impl Eq for ContentRange
Source§impl PartialEq for ContentRange
impl PartialEq for ContentRange
Source§fn eq(&self, other: &ContentRange) -> bool
fn eq(&self, other: &ContentRange) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ContentRange
Auto Trait Implementations§
impl Freeze for ContentRange
impl RefUnwindSafe for ContentRange
impl Send for ContentRange
impl Sync for ContentRange
impl Unpin for ContentRange
impl UnsafeUnpin for ContentRange
impl UnwindSafe for ContentRange
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.