pub struct ArchiveClient { /* private fields */ }Implementations§
Source§impl ArchiveClient
impl ArchiveClient
pub fn builder(client: Client, pre_min_limit: u32) -> ArchiveClientBuilder
pub async fn fetch_with_method<T: DeserializeOwned>( &self, method: Method, url: impl IntoUrl + Clone, ) -> Result<T>
pub async fn fetch<T: DeserializeOwned>( &self, url: impl IntoUrl + Clone, ) -> Result<T>
pub async fn download( &self, with_in: &Path, url: impl IntoUrl + Clone, ) -> Result<PathBuf>
Methods from Deref<Target = ClientWithMiddleware>§
Sourcepub fn get<U>(&self, url: U) -> RequestBuilderwhere
U: IntoUrl,
pub fn get<U>(&self, url: U) -> RequestBuilderwhere
U: IntoUrl,
Convenience method to make a GET request to a URL.
§Errors
This method fails whenever the supplied Url cannot be parsed.
Sourcepub fn post<U>(&self, url: U) -> RequestBuilderwhere
U: IntoUrl,
pub fn post<U>(&self, url: U) -> RequestBuilderwhere
U: IntoUrl,
Convenience method to make a POST request to a URL.
§Errors
This method fails whenever the supplied Url cannot be parsed.
Sourcepub fn put<U>(&self, url: U) -> RequestBuilderwhere
U: IntoUrl,
pub fn put<U>(&self, url: U) -> RequestBuilderwhere
U: IntoUrl,
Convenience method to make a PUT request to a URL.
§Errors
This method fails whenever the supplied Url cannot be parsed.
Sourcepub fn patch<U>(&self, url: U) -> RequestBuilderwhere
U: IntoUrl,
pub fn patch<U>(&self, url: U) -> RequestBuilderwhere
U: IntoUrl,
Convenience method to make a PATCH request to a URL.
§Errors
This method fails whenever the supplied Url cannot be parsed.
Sourcepub fn delete<U>(&self, url: U) -> RequestBuilderwhere
U: IntoUrl,
pub fn delete<U>(&self, url: U) -> RequestBuilderwhere
U: IntoUrl,
Convenience method to make a DELETE request to a URL.
§Errors
This method fails whenever the supplied Url cannot be parsed.
Sourcepub fn head<U>(&self, url: U) -> RequestBuilderwhere
U: IntoUrl,
pub fn head<U>(&self, url: U) -> RequestBuilderwhere
U: IntoUrl,
Convenience method to make a HEAD request to a URL.
§Errors
This method fails whenever the supplied Url cannot be parsed.
Sourcepub fn request<U>(&self, method: Method, url: U) -> RequestBuilderwhere
U: IntoUrl,
pub fn request<U>(&self, method: Method, url: U) -> RequestBuilderwhere
U: IntoUrl,
Start building a Request with the Method and Url.
Returns a RequestBuilder, which will allow setting headers and
the request body before sending.
§Errors
This method fails whenever the supplied Url cannot be parsed.
Sourcepub async fn execute(&self, req: Request) -> Result<Response, Error>
pub async fn execute(&self, req: Request) -> Result<Response, Error>
Executes a Request.
A Request can be built manually with Request::new() or obtained
from a RequestBuilder with RequestBuilder::build().
You should prefer to use the RequestBuilder and
RequestBuilder::send().
§Errors
This method fails if there was an error while sending request, redirect loop was detected or redirect limit was exhausted.
Sourcepub async fn execute_with_extensions(
&self,
req: Request,
ext: &mut Extensions,
) -> Result<Response, Error>
pub async fn execute_with_extensions( &self, req: Request, ext: &mut Extensions, ) -> Result<Response, Error>
Executes a Request with initial Extensions.
A Request can be built manually with Request::new() or obtained
from a RequestBuilder with RequestBuilder::build().
You should prefer to use the RequestBuilder and
RequestBuilder::send().
§Errors
This method fails if there was an error while sending request, redirect loop was detected or redirect limit was exhausted.
Trait Implementations§
Source§impl Clone for ArchiveClient
impl Clone for ArchiveClient
Source§fn clone(&self) -> ArchiveClient
fn clone(&self) -> ArchiveClient
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more