pub struct OwnedPending { /* private fields */ }Expand description
Incremental execution of a prepared statement, one task at a time.
An owned pending execution: like PendingResult but it owns its
CachedStatement instead of borrowing one, so it carries no lifetime and is
'static.
This is what lets the async adapter step a query one task per
spawn_blocking dispatch — the whole OwnedPending moves in and out of each
blocking task, which a borrow-based PendingResult could not do.
Implementations§
Source§impl OwnedPending
impl OwnedPending
Sourcepub fn execute_task(&mut self) -> PendingState
pub fn execute_task(&mut self) -> PendingState
Executes a single task, returning the resulting PendingState.
Sourcepub fn execute(self) -> Result<DuckResult>
pub fn execute(self) -> Result<DuckResult>
Runs to completion and returns the materialised DuckResult, consuming
self so the result is transferred exactly once.
§Errors
Returns Error::Engine carrying DuckDB’s classification/message on failure.
Trait Implementations§
Source§impl Drop for OwnedPending
impl Drop for OwnedPending
impl Send for OwnedPending
Auto Trait Implementations§
impl !Sync for OwnedPending
impl Freeze for OwnedPending
impl RefUnwindSafe for OwnedPending
impl Unpin for OwnedPending
impl UnsafeUnpin for OwnedPending
impl UnwindSafe for OwnedPending
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