mirror of
https://github.com/OMGeeky/google-apis-rs.git
synced 2026-02-23 15:49:49 +01:00
fix(rustup): rustc (be9bd7c93 2015-04-05)
* using std::convert * update to latest hyper (and other dependencies) Related to #46
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
[package]
|
||||
|
||||
name = "google-deploymentmanager2_beta1"
|
||||
version = "0.1.2+20141215"
|
||||
version = "0.1.2+20150303"
|
||||
authors = ["Sebastian Thiel <byronimo@gmail>"]
|
||||
description = "A complete library to interact with deploymentmanager (protocol v2beta1)"
|
||||
repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/deploymentmanager2_beta1"
|
||||
|
||||
@@ -5,7 +5,7 @@ DO NOT EDIT !
|
||||
-->
|
||||
The `google-deploymentmanager2_beta1` library allows access to all features of the *Google deploymentmanager* service.
|
||||
|
||||
This documentation was generated from *deploymentmanager* crate version *0.1.2+20141215*, where *20141215* is the exact revision of the *deploymentmanager:v2beta1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.2*.
|
||||
This documentation was generated from *deploymentmanager* crate version *0.1.2+20150303*, where *20150303* is the exact revision of the *deploymentmanager:v2beta1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.2*.
|
||||
|
||||
Everything else about the *deploymentmanager* *v2_beta1* API can be found at the
|
||||
[official documentation site](https://developers.google.com/deployment-manager/).
|
||||
@@ -81,8 +81,8 @@ google-deploymentmanager2_beta1 = "*"
|
||||
|
||||
```Rust
|
||||
extern crate hyper;
|
||||
extern crate "yup-oauth2" as oauth2;
|
||||
extern crate "google-deploymentmanager2_beta1" as deploymentmanager2_beta1;
|
||||
extern crate yup_oauth2 as oauth2;
|
||||
extern crate google_deploymentmanager2_beta1 as deploymentmanager2_beta1;
|
||||
use deploymentmanager2_beta1::{Result, Error};
|
||||
use std::default::Default;
|
||||
use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage};
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
// COPY OF 'src/rust/api/cmn.rs'
|
||||
// DO NOT EDIT
|
||||
use std::marker::MarkerTrait;
|
||||
use std::io::{self, Read, Seek, Cursor, Write, SeekFrom};
|
||||
use std;
|
||||
use std::fmt::{self, Display};
|
||||
use std::str::FromStr;
|
||||
use std::thread::sleep;
|
||||
use std::thread::sleep_ms;
|
||||
|
||||
use mime::{Mime, TopLevel, SubLevel, Attr, Value};
|
||||
use oauth2::{TokenType, Retry, self};
|
||||
@@ -21,35 +20,35 @@ use serde;
|
||||
/// Identifies the Hub. There is only one per library, this trait is supposed
|
||||
/// to make intended use more explicit.
|
||||
/// The hub allows to access all resource methods more easily.
|
||||
pub trait Hub: MarkerTrait {}
|
||||
pub trait Hub {}
|
||||
|
||||
/// Identifies types for building methods of a particular resource type
|
||||
pub trait MethodsBuilder: MarkerTrait {}
|
||||
pub trait MethodsBuilder {}
|
||||
|
||||
/// Identifies types which represent builders for a particular resource method
|
||||
pub trait CallBuilder: MarkerTrait {}
|
||||
pub trait CallBuilder {}
|
||||
|
||||
/// Identifies types which can be inserted and deleted.
|
||||
/// Types with this trait are most commonly used by clients of this API.
|
||||
pub trait Resource: MarkerTrait {}
|
||||
pub trait Resource {}
|
||||
|
||||
/// Identifies types which are used in API responses.
|
||||
pub trait ResponseResult: MarkerTrait {}
|
||||
pub trait ResponseResult {}
|
||||
|
||||
/// Identifies types which are used in API requests.
|
||||
pub trait RequestValue: MarkerTrait {}
|
||||
pub trait RequestValue {}
|
||||
|
||||
/// Identifies types which are not actually used by the API
|
||||
/// This might be a bug within the google API schema.
|
||||
pub trait UnusedType: MarkerTrait {}
|
||||
pub trait UnusedType {}
|
||||
|
||||
/// Identifies types which are only used as part of other types, which
|
||||
/// usually are carrying the `Resource` trait.
|
||||
pub trait Part: MarkerTrait {}
|
||||
pub trait Part {}
|
||||
|
||||
/// Identifies types which are only used by other types internally.
|
||||
/// They have no special meaning, this trait just marks them for completeness.
|
||||
pub trait NestedType: MarkerTrait {}
|
||||
pub trait NestedType {}
|
||||
|
||||
/// A utility to specify reader types which provide seeking capabilities too
|
||||
pub trait ReadSeek: Seek + Read {}
|
||||
@@ -380,14 +379,10 @@ impl<'a> Read for MultiPartReader<'a> {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// The `X-Upload-Content-Type` header.
|
||||
#[derive(Clone, PartialEq, Debug)]
|
||||
pub struct XUploadContentType(pub Mime);
|
||||
|
||||
impl_header!(XUploadContentType,
|
||||
"X-Upload-Content-Type",
|
||||
Mime);
|
||||
header!{
|
||||
#[doc="The `X-Upload-Content-Type` header."]
|
||||
(XUploadContentType, "X-Upload-Content-Type") => [Mime]
|
||||
}
|
||||
|
||||
#[derive(Clone, PartialEq, Debug)]
|
||||
pub struct Chunk {
|
||||
@@ -519,7 +514,7 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A>
|
||||
Some(hh) if r.status == StatusCode::PermanentRedirect => hh,
|
||||
None|Some(_) => {
|
||||
if let Retry::After(d) = self.delegate.http_failure(&r, None) {
|
||||
sleep(d);
|
||||
sleep_ms(d.num_milliseconds() as u32);
|
||||
continue;
|
||||
}
|
||||
return Err(Ok(r))
|
||||
@@ -529,7 +524,7 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A>
|
||||
}
|
||||
Err(err) => {
|
||||
if let Retry::After(d) = self.delegate.http_error(&err) {
|
||||
sleep(d);
|
||||
sleep_ms(d.num_milliseconds() as u32);
|
||||
continue;
|
||||
}
|
||||
return Err(Err(err))
|
||||
@@ -586,7 +581,7 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A>
|
||||
let mut json_err = String::new();
|
||||
res.read_to_string(&mut json_err).unwrap();
|
||||
if let Retry::After(d) = self.delegate.http_failure(&res, serde::json::from_str(&json_err).ok()) {
|
||||
sleep(d);
|
||||
sleep_ms(d.num_milliseconds() as u32);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -594,7 +589,7 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A>
|
||||
},
|
||||
Err(err) => {
|
||||
if let Retry::After(d) = self.delegate.http_error(&err) {
|
||||
sleep(d);
|
||||
sleep_ms(d.num_milliseconds() as u32);
|
||||
continue;
|
||||
}
|
||||
return Some(Err(err))
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user