pub struct CursorPolling<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§
Source§impl<S> CursorPolling<S>where
S: AsStatementRef,
impl<S> CursorPolling<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.
Sourcepub fn bind_buffer<B>(
self,
row_set_buffer: B,
) -> Result<BlockCursorPolling<Self, B>, Error>where
B: RowSetBuffer,
pub fn bind_buffer<B>(
self,
row_set_buffer: B,
) -> Result<BlockCursorPolling<Self, B>, Error>where
B: RowSetBuffer,
Binds this cursor to a buffer holding a row set.