[][src]Trait sqlany_extfnapi::ExtFnValueCursor

pub trait ExtFnValueCursor {
    type Item: ?Sized;
    fn advance(&mut self) -> Result<(), Error>;
fn get(&self) -> Option<&Self::Item>;
fn is_null(&self) -> bool;
fn kind(&self) -> SqlDataTypeKind;
fn data_type(&self) -> SqlDataType;
fn len(&self) -> usize; fn next(&mut self) -> Result<Option<&Self::Item>, Error> { ... }
fn for_each<F>(self, f: F) -> Result<(), Error>
    where
        Self: Sized,
        F: FnMut(&Self::Item)
, { ... }
fn fold<F, U>(self, init: U, f: F) -> Result<U, Error>
    where
        Self: Sized,
        F: FnMut(U, &Self::Item) -> U
, { ... }
fn collect<U>(self) -> Result<U, Error>
    where
        Self: Sized,
        U: for<'s> Extend<&'s Self::Item> + Default
, { ... } }

Cursor of SQL anywhere values that are potentially multipart.

Associated Types

type Item: ?Sized

The type presented by the cursor.

Loading content...

Required methods

fn advance(&mut self) -> Result<(), Error>

Advances the cursor to the next value part if available.

Cursors are initially unstarted, so this method should be called before get when iterating.

The behavior of calling this method after get has returned None, or after this method has returned an error is unspecified.

fn get(&self) -> Option<&Self::Item>

Returns the current value part.

The behavior of calling this method before any calls to advance is unspecified.

fn is_null(&self) -> bool

Returns if the data value is NULL

fn kind(&self) -> SqlDataTypeKind

Returns the actual catalog type for the argument

fn data_type(&self) -> SqlDataType

Returns the data type for the argument

fn len(&self) -> usize

Returns the total length for the argument

Loading content...

Provided methods

fn next(&mut self) -> Result<Option<&Self::Item>, Error>

Advances the cursor, returning the next value part if available.

fn for_each<F>(self, f: F) -> Result<(), Error> where
    Self: Sized,
    F: FnMut(&Self::Item), 

Calls a closure on each element of an iterator.

fn fold<F, U>(self, init: U, f: F) -> Result<U, Error> where
    Self: Sized,
    F: FnMut(U, &Self::Item) -> U, 

Consume the cursor, producing a single, final value.

fn collect<U>(self) -> Result<U, Error> where
    Self: Sized,
    U: for<'s> Extend<&'s Self::Item> + Default

Consume the cursor folding into the given Extend type

Loading content...

Implementations on Foreign Types

impl<'a, I: ?Sized> ExtFnValueCursor for &'a mut I where
    I: ExtFnValueCursor
[src]

type Item = I::Item

fn is_null(&self) -> bool[src]

Returns if the data value is NULL

fn kind(&self) -> SqlDataTypeKind[src]

Returns the actual catalog type for the argument

fn data_type(&self) -> SqlDataType[src]

Returns the data type for the argument

fn len(&self) -> usize[src]

Returns the total length for the argument

Loading content...

Implementors

impl<'a> ExtFnValueCursor for ExtFnByteValues<'a>[src]

type Item = [u8]

impl<'a> ExtFnValueCursor for ExtFnStrValues<'a>[src]

type Item = str

Loading content...