mirror of
https://github.com/OMGeeky/google-apis-rs.git
synced 2026-02-23 15:49:49 +01:00
fix(mbuild): simplification and cleanup
* renamed `*MethodsBuilder` type to `*Methods` type * renamed `*CallBuilder` type to `*Call` type * greatly simplified `doit()` signature if uploads are involved * pass `auth` to upload helper
This commit is contained in:
@@ -302,17 +302,19 @@ impl_header!(XUploadContentType,
|
||||
Mime);
|
||||
|
||||
/// A utility type to perform a resumable upload from start to end.
|
||||
pub struct ResumableUploadHelper<'a, NC: 'a> {
|
||||
pub struct ResumableUploadHelper<'a, NC: 'a, A: 'a> {
|
||||
pub client: &'a mut hyper::client::Client<NC>,
|
||||
pub delegate: &'a mut Delegate,
|
||||
pub auth: &'a mut A,
|
||||
pub url: &'a str,
|
||||
pub reader: &'a mut ReadSeek,
|
||||
pub media_type: Mime,
|
||||
pub content_size: u64
|
||||
}
|
||||
|
||||
impl<'a, NC> ResumableUploadHelper<'a, NC>
|
||||
where NC: hyper::net::NetworkConnector {
|
||||
impl<'a, NC, A> ResumableUploadHelper<'a, NC, A>
|
||||
where NC: hyper::net::NetworkConnector,
|
||||
A: oauth2::GetToken {
|
||||
pub fn upload(&'a mut self) -> hyper::HttpResult<hyper::client::Response> {
|
||||
Err(hyper::error::HttpError::HttpStatusError)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user