Struct tarantool::tuple::TupleIterator [−][src]
Tuple iterator
Implementations
impl TupleIterator
[src]
pub fn position(&self) -> u32
[src]
Return zero-based next position in iterator.
That is, this function return the field id of field that will be
returned by the next call to box_tuple_next(it)
. Returned value is zero
after initialization or rewind and box_tuple_field_count(Tuple)
after the end of iteration.
pub fn rewind(&mut self)
[src]
Rewind iterator to the initial position.
pub fn seek<T>(&mut self, fieldno: u32) -> Result<Option<T>, Error> where
T: DeserializeOwned,
[src]
T: DeserializeOwned,
Seek the Tuple iterator.
Requested fieldno returned by next call to box_tuple_next(it)
.
fieldno
- zero-based position in MsgPack array.
After call:
box_tuple_position(it) == fieldno
if returned value is notNone
box_tuple_position(it) == box_tuple_field_count(Tuple)
if returned value isNone
.
pub fn next<T>(&mut self) -> Result<Option<T>, Error> where
T: DeserializeOwned,
[src]
T: DeserializeOwned,
Return the next Tuple field from Tuple iterator.
Returns:
None
ifi >= box_tuple_field_count(Tuple)
or if field has a non primitive type- field value otherwise
After call:
box_tuple_position(it) == fieldno
if returned value is notNone
box_tuple_position(it) == box_tuple_field_count(Tuple)
if returned value isNone
.
pub fn update(&mut self)
[src]
Trait Implementations
impl Drop for TupleIterator
[src]
Auto Trait Implementations
impl RefUnwindSafe for TupleIterator
impl !Send for TupleIterator
impl !Sync for TupleIterator
impl Unpin for TupleIterator
impl UnwindSafe for TupleIterator
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,