[][src]Struct google_docs1::DocumentMethods

pub struct DocumentMethods<'a, C, A> where
    C: 'a,
    A: 'a, 
{ /* fields omitted */ }

A builder providing access to all methods supported on document resources. It is not used directly, but through the Docs hub.

Example

Instantiate a resource builder

extern crate hyper;
extern crate hyper_rustls;
extern crate yup_oauth2 as oauth2;
extern crate google_docs1 as docs1;
 
use std::default::Default;
use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage};
use docs1::Docs;
 
let secret: ApplicationSecret = Default::default();
let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate,
                              hyper::Client::with_connector(hyper::net::HttpsConnector::new(hyper_rustls::TlsClient::new())),
                              <MemoryStorage as Default>::default(), None);
let mut hub = Docs::new(hyper::Client::with_connector(hyper::net::HttpsConnector::new(hyper_rustls::TlsClient::new())), auth);
// Usually you wouldn't bind this to a variable, but keep calling *CallBuilders*
// like `batch_update(...)`, `create(...)` and `get(...)`
// to build up your call.
let rb = hub.documents();

Methods

impl<'a, C, A> DocumentMethods<'a, C, A>[src]

pub fn create(&self, request: Document) -> DocumentCreateCall<'a, C, A>[src]

Create a builder to help you perform the following task:

Creates a blank document using the title given in the request. Other fields in the request, including any provided content, are ignored.

Returns the created document.

Arguments

  • request - No description provided.

pub fn get(&self, document_id: &str) -> DocumentGetCall<'a, C, A>[src]

Create a builder to help you perform the following task:

Gets the latest version of the specified document.

Arguments

  • documentId - The ID of the document to retrieve.

pub fn batch_update(
    &self,
    request: BatchUpdateDocumentRequest,
    document_id: &str
) -> DocumentBatchUpdateCall<'a, C, A>
[src]

Create a builder to help you perform the following task:

Applies one or more updates to the document.

Each request is validated before being applied. If any request is not valid, then the entire request will fail and nothing will be applied.

Some requests have replies to give you some information about how they are applied. Other requests do not need to return information; these each return an empty reply. The order of replies matches that of the requests.

For example, suppose you call batchUpdate with four updates, and only the third one returns information. The response would have two empty replies, the reply to the third request, and another empty reply, in that order.

Because other users may be editing the document, the document might not exactly reflect your changes: your changes may be altered with respect to collaborator changes. If there are no collaborators, the document should reflect your changes. In any case, the updates in your request are guaranteed to be applied together atomically.

Arguments

  • request - No description provided.
  • documentId - The ID of the document to update.

Trait Implementations

impl<'a, C, A> MethodsBuilder for DocumentMethods<'a, C, A>[src]

Auto Trait Implementations

impl<'a, C, A> !Send for DocumentMethods<'a, C, A>

impl<'a, C, A> Unpin for DocumentMethods<'a, C, A>

impl<'a, C, A> !Sync for DocumentMethods<'a, C, A>

impl<'a, C, A> !UnwindSafe for DocumentMethods<'a, C, A>

impl<'a, C, A> !RefUnwindSafe for DocumentMethods<'a, C, A>

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Typeable for T where
    T: Any

fn get_type(&self) -> TypeId

Get the TypeId of this object.