[−][src]Struct gcsf::DriveFacade
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]
&mut self,
parents: Option<Vec<String>>,
trashed: Option<bool>
) -> Result<Vec<File>, Error>
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]
&mut self,
drive_id: &str,
mime_type: Option<String>,
offset: usize,
size: usize
) -> Option<&[u8]>
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]
&mut self,
id: &String,
parent: &String,
new_name: &str
) -> Result<(Response, File), Error>
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]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Typeable for T where
T: Any,
T: Any,