pub struct RemoteInfo {
pub final_url: Url,
pub size: Option<u64>,
pub accept_ranges: bool,
pub etag: Option<String>,
pub last_modified: Option<String>,
pub content_type: Option<String>,
pub content_disposition: Option<String>,
pub content_encoding: Option<String>,
}Expand description
Everything we learn about the remote resource before transferring it.
Fields§
§final_url: Url§size: Option<u64>§accept_ranges: bool§etag: Option<String>§last_modified: Option<String>§content_type: Option<String>§content_disposition: Option<String>§content_encoding: Option<String>Set when the server sent a non-identity Content-Encoding; the bytes on
disk will be the encoded form, so we warn rather than pretend.
Implementations§
Source§impl RemoteInfo
impl RemoteInfo
Sourcepub fn supports_parallel(&self) -> bool
pub fn supports_parallel(&self) -> bool
Can we safely split this into parallel ranges?
Sourcepub fn validator(&self) -> Option<String>
pub fn validator(&self) -> Option<String>
The strongest validator available, for If-Range (PRD §13).
pub fn has_strong_etag(&self) -> bool
Trait Implementations§
Source§impl Clone for RemoteInfo
impl Clone for RemoteInfo
Source§fn clone(&self) -> RemoteInfo
fn clone(&self) -> RemoteInfo
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 moreAuto Trait Implementations§
impl Freeze for RemoteInfo
impl RefUnwindSafe for RemoteInfo
impl Send for RemoteInfo
impl Sync for RemoteInfo
impl Unpin for RemoteInfo
impl UnsafeUnpin for RemoteInfo
impl UnwindSafe for RemoteInfo
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