pub struct FilesApi<'a> { /* private fields */ }Expand description
Files API façade.
Implementations§
Source§impl<'a> FilesApi<'a>
impl<'a> FilesApi<'a>
Sourcepub fn new(client: &'a DriveClient) -> Self
pub fn new(client: &'a DriveClient) -> Self
Wraps an existing DriveClient for file operations.
Sourcepub async fn search(
&self,
query: Option<&str>,
limit: usize,
page_token: Option<&str>,
) -> Result<FileListResponse>
pub async fn search( &self, query: Option<&str>, limit: usize, page_token: Option<&str>, ) -> Result<FileListResponse>
Searches files matching query, returning a single page.
limit is rejected client-side when it exceeds MAX_PAGE_LIMIT;
use Self::search_all to auto-paginate across pages.
Sourcepub async fn search_all(
&self,
query: Option<&str>,
limit: usize,
) -> Result<FileListResponse>
pub async fn search_all( &self, query: Option<&str>, limit: usize, ) -> Result<FileListResponse>
Searches files, auto-paginating via cursor as needed.
limit == 0 means “fetch every match up to HARD_CAP” — a
deliberate safety limit for this interactive surface.
Sourcepub async fn get_metadata(&self, file_id: &str) -> Result<DriveFile>
pub async fn get_metadata(&self, file_id: &str) -> Result<DriveFile>
Fetches a single file’s metadata (files.get), including
exportLinks.
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for FilesApi<'a>
impl<'a> !UnwindSafe for FilesApi<'a>
impl<'a> Freeze for FilesApi<'a>
impl<'a> Send for FilesApi<'a>
impl<'a> Sync for FilesApi<'a>
impl<'a> Unpin for FilesApi<'a>
impl<'a> UnsafeUnpin for FilesApi<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more