[][src]Struct gcsf::DriveFacade

pub struct DriveFacade {
    pub hub: Drive<Client, Authenticator<DefaultAuthenticatorDelegate, DiskTokenStorage, Client>>,
    // some fields omitted
}

Provides a simple high-level interface for interacting with the Google Drive API.

Fields

hub: Drive<Client, Authenticator<DefaultAuthenticatorDelegate, DiskTokenStorage, Client>>

The drive3::Drive hub used for interacting with the API.

Methods

impl DriveFacade[src]

pub fn new(config: &Config) -> Self[src]

pub fn root_id(&mut self) -> Result<&String, Error>[src]

Returns the Drive ID of the root "My Drive" directory

pub fn get_all_changes(&mut self) -> Result<Vec<Change>, Error>[src]

Returns a list of all changes reported by Drive which are more recent than the changes token indicates.

pub fn get_all_files(
    &mut self,
    parents: Option<Vec<String>>,
    trashed: Option<bool>
) -> Result<Vec<File>, Error>
[src]

Returns a list of all files from Drive. If the parents list is provided, only files which are children of any one of the list's elements are returned. If trashed is provided, only files which are trashed/not trashed are returned. The two filters can be used together.

pub fn read(
    &mut self,
    drive_id: &str,
    mime_type: Option<String>,
    offset: usize,
    size: usize
) -> Option<&[u8]>
[src]

pub fn create(&mut self, drive_file: &File) -> Result<String, Error>[src]

pub fn write(&mut self, id: String, offset: usize, data: &[u8])[src]

pub fn delete_permanently(&mut self, id: &String) -> Result<bool, Error>[src]

pub fn move_to(
    &mut self,
    id: &String,
    parent: &String,
    new_name: &str
) -> Result<(Response, File), Error>
[src]

pub fn move_to_trash(&mut self, id: String) -> Result<(), Error>[src]

pub fn flush(&mut self, id: &String) -> Result<(), Error>[src]

pub fn size_and_capacity(&mut self) -> Result<(u64, Option<u64>), Error>[src]

Returns the size and capacity of the Drive account. In some cases, the limit can be absent.

Auto Trait Implementations

impl Send for DriveFacade

impl !Sync for DriveFacade

Blanket Implementations

impl<T> From for T[src]

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

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Typeable for T where
    T: Any

fn get_type(&self) -> TypeId

Get the TypeId of this object.