pub struct DocumentHandle { /* private fields */ }Expand description
A handle for managing a document within a file search store.
Provides methods to check document state, refresh metadata, and delete documents.
Implementations§
Source§impl DocumentHandle
impl DocumentHandle
pub fn new(client: Arc<GeminiClient>, document: Document) -> Self
pub fn name(&self) -> &str
pub fn state(&self) -> DocumentState
pub fn is_active(&self) -> bool
pub fn document(&self) -> &Document
pub async fn refresh(&mut self) -> Result<(), Error>
pub async fn delete(self, force: bool) -> Result<(), Error>
Trait Implementations§
Source§impl Clone for DocumentHandle
impl Clone for DocumentHandle
Source§fn clone(&self) -> DocumentHandle
fn clone(&self) -> DocumentHandle
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 DocumentHandle
impl !RefUnwindSafe for DocumentHandle
impl Send for DocumentHandle
impl Sync for DocumentHandle
impl Unpin for DocumentHandle
impl !UnwindSafe for DocumentHandle
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