Struct odbc_api::CursorPolling

source ·
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,

source

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.

source

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.

Trait Implementations§

source§

impl<S> AsStatementRef for CursorPolling<S>where S: AsStatementRef,

source§

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.
source§

impl<S> Drop for CursorPolling<S>where S: AsStatementRef,

source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

§

impl<Stmt> RefUnwindSafe for CursorPolling<Stmt>where Stmt: RefUnwindSafe,

§

impl<Stmt> Send for CursorPolling<Stmt>where Stmt: Send,

§

impl<Stmt> Sync for CursorPolling<Stmt>where Stmt: Sync,

§

impl<Stmt> Unpin for CursorPolling<Stmt>where Stmt: Unpin,

§

impl<Stmt> UnwindSafe for CursorPolling<Stmt>where Stmt: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.