Struct odbc_api::CursorAsync
source · [−]pub struct CursorAsync<Stmt: AsStatementRef> { /* private fields */ }Expand description
The asynchronous sibiling of CursorImpl. Use this to fetch results in asynchronous code.
Like CursorImpl this is an ODBC statement handle in cursor state. However unlike its
synchronous sibling this statement handle is in asynchronous polling mode.
Implementations
sourceimpl<S> CursorAsync<S> where
S: AsStatementRef,
impl<S> CursorAsync<S> where
S: AsStatementRef,
sourcepub unsafe fn new(statement: S) -> Self
pub unsafe fn new(statement: S) -> Self
Users of this library are encouraged not to call this constructor directly. This method is pubilc so users with an understanding of the raw ODBC C-API have a way to create an asynchronous cursor, after they left the safety rails of the Rust type System, in order to implement a use case not covered yet, by the safe abstractions within this crate.
Safety
statement must be in Cursor state, for the invariants of this type to hold. Preferable
statement should also have asynchrous mode enabled, otherwise constructing a synchronous
CursorImpl is more suitable.
Trait Implementations
sourceimpl<S> AsStatementRef for CursorAsync<S> where
S: AsStatementRef,
impl<S> AsStatementRef for CursorAsync<S> where
S: AsStatementRef,
sourcefn as_stmt_ref(&mut self) -> StatementRef<'_>
fn as_stmt_ref(&mut self) -> StatementRef<'_>
Get an exclusive reference to the underlying statement handle. This method is used to implement other more higher level methods on top of it. It is not intended to be called by users of this crate directly, yet it may serve as an escape hatch for low level usecases. Read more
sourceimpl<S> Drop for CursorAsync<S> where
S: AsStatementRef,
impl<S> Drop for CursorAsync<S> where
S: AsStatementRef,
Auto Trait Implementations
impl<Stmt> RefUnwindSafe for CursorAsync<Stmt> where
Stmt: RefUnwindSafe,
impl<Stmt> Send for CursorAsync<Stmt> where
Stmt: Send,
impl<Stmt> Sync for CursorAsync<Stmt> where
Stmt: Sync,
impl<Stmt> Unpin for CursorAsync<Stmt> where
Stmt: Unpin,
impl<Stmt> UnwindSafe for CursorAsync<Stmt> where
Stmt: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more