odbc_api

Struct 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 use cases.
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> Freeze for CursorPolling<Stmt>
where Stmt: Freeze,

§

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 T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

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

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 T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

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

Source§

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

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more