Skip to content

Commit

Permalink
Introduce Client
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanUkhov committed Oct 3, 2024
1 parent 8835901 commit 82a00cc
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions google-apis-common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ pub type Body = http_body_util::Full<hyper::body::Bytes>;
/// A response.
pub type Response = hyper::Response<Body>;

/// A client.
pub trait Client: hyper_util::client::legacy::connect::Connect + Clone + Send + Sync + 'static {}

pub enum Retry {
/// Signal you don't want to retry
Abort,
Expand Down Expand Up @@ -572,7 +575,7 @@ impl RangeResponseHeader {
/// A utility type to perform a resumable upload from start to end.
pub struct ResumableUploadHelper<'a, A: 'a, C>
where
C: hyper_util::client::legacy::connect::Connect + Clone + Send + Sync + 'static,
C: Client,
{
pub client: &'a hyper_util::client::legacy::Client<C, Body>,
pub delegate: &'a mut dyn Delegate,
Expand All @@ -588,7 +591,7 @@ where

impl<'a, A, C> ResumableUploadHelper<'a, A, C>
where
C: hyper_util::client::legacy::connect::Connect + Clone + Send + Sync + 'static,
C: Client,
{
async fn query_transfer_status(
&mut self,
Expand Down

0 comments on commit 82a00cc

Please sign in to comment.