pub trait ExtFnValueCursor {
type Item: ?Sized;
// Required methods
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;
// Provided methods
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 { ... }
}
Expand description
Cursor of SQL anywhere values that are potentially multipart.
Required Associated Types§
Required Methods§
Sourcefn advance(&mut self) -> Result<(), Error>
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.
Sourcefn get(&self) -> Option<&Self::Item>
fn get(&self) -> Option<&Self::Item>
Returns the current value part.
The behavior of calling this method before any calls to advance
is unspecified.
Sourcefn kind(&self) -> SqlDataTypeKind
fn kind(&self) -> SqlDataTypeKind
Returns the actual catalog type for the argument
Sourcefn data_type(&self) -> SqlDataType
fn data_type(&self) -> SqlDataType
Returns the data type for the argument
Provided Methods§
Sourcefn next(&mut self) -> Result<Option<&Self::Item>, Error>
fn next(&mut self) -> Result<Option<&Self::Item>, Error>
Advances the cursor, returning the next value part if available.
Sourcefn for_each<F>(self, f: F) -> Result<(), Error>
fn for_each<F>(self, f: F) -> Result<(), Error>
Calls a closure on each element of an iterator.
Implementations on Foreign Types§
Source§impl<'a, I> ExtFnValueCursor for &'a mut Iwhere
I: ExtFnValueCursor + ?Sized,
impl<'a, I> ExtFnValueCursor for &'a mut Iwhere
I: ExtFnValueCursor + ?Sized,
Source§fn kind(&self) -> SqlDataTypeKind
fn kind(&self) -> SqlDataTypeKind
Returns the actual catalog type for the argument
Source§fn data_type(&self) -> SqlDataType
fn data_type(&self) -> SqlDataType
Returns the data type for the argument