[][src]Struct tarantool_module::tuple::TupleIterator

pub struct TupleIterator { /* fields omitted */ }

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]

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 not None
  • box_tuple_position(it) == box_tuple_field_count(Tuple) if returned value is None.

pub fn next<T>(&mut self) -> Result<Option<T>, Error> where
    T: DeserializeOwned
[src]

Return the next Tuple field from Tuple iterator.

Returns:

  • None if i >= 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 not None
  • box_tuple_position(it) == box_tuple_field_count(Tuple) if returned value is None.

pub fn update(&mut self)[src]

Trait Implementations

impl Drop for TupleIterator[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.