pub struct OperationHandle { /* private fields */ }Expand description
A handle for monitoring long-running file upload/import operations.
Operations represent asynchronous processing tasks like file chunking,
embedding generation, and indexing. Use wait_until_done
to poll until completion.
Implementations§
Source§impl OperationHandle
impl OperationHandle
pub fn new(client: Arc<GeminiClient>, operation: Operation) -> Self
pub fn name(&self) -> &str
pub fn is_done(&self) -> bool
pub fn result(&self) -> Option<&OperationResult>
pub async fn refresh(&mut self) -> Result<(), Error>
pub async fn wait_until_done( &mut self, interval: Duration, timeout: Option<Duration>, ) -> Result<(), Error>
Trait Implementations§
Source§impl Clone for OperationHandle
impl Clone for OperationHandle
Source§fn clone(&self) -> OperationHandle
fn clone(&self) -> OperationHandle
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 OperationHandle
impl !RefUnwindSafe for OperationHandle
impl Send for OperationHandle
impl Sync for OperationHandle
impl Unpin for OperationHandle
impl !UnwindSafe for OperationHandle
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