#[non_exhaustive]pub enum PendingState {
Ready,
NotReady,
Error,
NoTasksAvailable,
Unknown(duckdb_pending_state),
}Expand description
Incremental execution of a prepared statement, one task at a time. The state of a pending execution, as reported by DuckDB.
Mirrors duckdb_pending_state. #[non_exhaustive] and carries
Unknown so a value a future DuckDB adds is
preserved rather than lost.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Ready
The result is ready; call execute.
NotReady
More tasks remain; call execute_task again.
Error
Execution failed; error has the message.
NoTasksAvailable
No tasks are currently available (e.g. waiting on another thread).
Unknown(duckdb_pending_state)
A state this build does not recognise; the raw value is preserved.
Implementations§
Source§impl PendingState
impl PendingState
Sourcepub fn is_finished(self) -> bool
pub fn is_finished(self) -> bool
Returns true if this state means execution has finished (result ready).
Uses DuckDB’s own duckdb_pending_execution_is_finished rather than
comparing to Ready directly, so the definition stays in sync with DuckDB.
Trait Implementations§
Source§impl Clone for PendingState
impl Clone for PendingState
Source§fn clone(&self) -> PendingState
fn clone(&self) -> PendingState
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for PendingState
Source§impl Debug for PendingState
impl Debug for PendingState
impl Eq for PendingState
Source§impl Hash for PendingState
impl Hash for PendingState
Source§impl PartialEq for PendingState
impl PartialEq for PendingState
Source§fn eq(&self, other: &PendingState) -> bool
fn eq(&self, other: &PendingState) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for PendingState
Auto Trait Implementations§
impl Freeze for PendingState
impl RefUnwindSafe for PendingState
impl Send for PendingState
impl Sync for PendingState
impl Unpin for PendingState
impl UnsafeUnpin for PendingState
impl UnwindSafe for PendingState
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