pub struct HttpPuller<Client: HttpClient> { /* private fields */ }Expand description
A Puller implementation that fetches data over HTTP.
Uses the generic HttpClient trait so it can work with any HTTP backend
(e.g. reqwest, custom clients). Supports range requests, file identity
checking, and reusing previously opened responses.
Implementations§
Source§impl<Client: HttpClient> HttpPuller<Client>
impl<Client: HttpClient> HttpPuller<Client>
Sourcepub const fn new(
url: Arc<Url>,
client: Client,
resp: Option<Arc<Mutex<Option<GetResponse<Client>>>>>,
file_id: FileId,
) -> Self
pub const fn new( url: Arc<Url>, client: Client, resp: Option<Arc<Mutex<Option<GetResponse<Client>>>>>, file_id: FileId, ) -> Self
Create a new HttpPuller.
url— the resource to download.client— the HTTP client used to issue requests.resp— an optional already-open response to reuse for the first (full-file) request, typically the one produced by a prefetch.file_id— the expectedcrate::FileId, compared against the server’s headers to detect a changed resource.
Trait Implementations§
Source§impl<C: HttpClient> Clone for HttpPuller<C>
impl<C: HttpClient> Clone for HttpPuller<C>
Source§impl<Client: HttpClient> Debug for HttpPuller<Client>
impl<Client: HttpClient> Debug for HttpPuller<Client>
Source§impl<Client: HttpClient> Puller for HttpPuller<Client>
impl<Client: HttpClient> Puller for HttpPuller<Client>
Auto Trait Implementations§
impl<Client> !RefUnwindSafe for HttpPuller<Client>
impl<Client> !UnwindSafe for HttpPuller<Client>
impl<Client> Freeze for HttpPuller<Client>where
Client: Freeze,
Option<Arc<Mutex<RawMutex, Option<<<Client as HttpClient>::RequestBuilder as HttpRequestBuilder>::Response>>>>: Freeze,
impl<Client> Send for HttpPuller<Client>where
Option<Arc<Mutex<RawMutex, Option<<<Client as HttpClient>::RequestBuilder as HttpRequestBuilder>::Response>>>>: Send,
impl<Client> Sync for HttpPuller<Client>where
Option<Arc<Mutex<RawMutex, Option<<<Client as HttpClient>::RequestBuilder as HttpRequestBuilder>::Response>>>>: Sync,
impl<Client> Unpin for HttpPuller<Client>where
Option<Arc<Mutex<RawMutex, Option<<<Client as HttpClient>::RequestBuilder as HttpRequestBuilder>::Response>>>>: Unpin,
impl<Client> UnsafeUnpin for HttpPuller<Client>where
Client: UnsafeUnpin,
Option<Arc<Mutex<RawMutex, Option<<<Client as HttpClient>::RequestBuilder as HttpRequestBuilder>::Response>>>>: UnsafeUnpin,
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