pub struct HttpSegmentDownloader { /* private fields */ }Implementations§
Source§impl HttpSegmentDownloader
impl HttpSegmentDownloader
Sourcepub fn new(client: &Client, use_hyper: bool) -> Self
pub fn new(client: &Client, use_hyper: bool) -> Self
Create a new HttpSegmentDownloader.
When use_hyper is true and the request URL is plain HTTP, the
download_range hot path will try HyperDirectClient first and fall
back to reqwest on any error. Pass false for proxy paths (the
HyperDirectClient does not support proxies, HTTPS, or custom
headers/cookies).
pub async fn supports_range( &self, url: &str, cookie_header: Option<&str>, headers: &[(String, String)], ) -> Result<bool>
pub async fn download_range( &self, url: &str, offset: u64, length: u64, cookie_header: Option<&str>, headers: &[(String, String)], ) -> Result<Bytes>
Auto Trait Implementations§
impl !RefUnwindSafe for HttpSegmentDownloader
impl !UnwindSafe for HttpSegmentDownloader
impl Freeze for HttpSegmentDownloader
impl Send for HttpSegmentDownloader
impl Sync for HttpSegmentDownloader
impl Unpin for HttpSegmentDownloader
impl UnsafeUnpin for HttpSegmentDownloader
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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