pub struct FileSearchStoreHandle { /* private fields */ }Expand description
A handle for managing a file search store.
Provides methods to upload files, import files, manage documents, and delete the store. The store persists indefinitely until explicitly deleted.
§Example
use gemini_rust::prelude::*;
let client = Gemini::new("API_KEY")?;
// Create a store
let store = client
.create_file_search_store()
.with_display_name("My Store")
.execute()
.await?;
// Upload a file
let data = b"Sample document content";
let operation = store
.upload(data.to_vec())
.with_display_name("Sample Doc")
.execute()
.await?;Implementations§
Source§impl FileSearchStoreHandle
impl FileSearchStoreHandle
pub fn new(client: Arc<GeminiClient>, store: FileSearchStore) -> Self
pub fn name(&self) -> &str
pub fn display_name(&self) -> Option<&str>
pub fn active_documents_count(&self) -> Option<i64>
pub fn pending_documents_count(&self) -> Option<i64>
pub fn failed_documents_count(&self) -> Option<i64>
pub fn size_bytes(&self) -> Option<i64>
pub fn store(&self) -> &FileSearchStore
pub async fn refresh(&mut self) -> Result<(), Error>
pub async fn delete(self, force: bool) -> Result<(), Error>
pub fn upload(&self, file_data: Vec<u8>) -> UploadBuilder
pub fn import_file(&self, file_name: String) -> ImportBuilder
pub fn documents(&self) -> DocumentBuilder
Trait Implementations§
Source§impl Clone for FileSearchStoreHandle
impl Clone for FileSearchStoreHandle
Source§fn clone(&self) -> FileSearchStoreHandle
fn clone(&self) -> FileSearchStoreHandle
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for FileSearchStoreHandle
impl !RefUnwindSafe for FileSearchStoreHandle
impl Send for FileSearchStoreHandle
impl Sync for FileSearchStoreHandle
impl Unpin for FileSearchStoreHandle
impl !UnwindSafe for FileSearchStoreHandle
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