[−][src]Struct tarantool_module::tuple::Tuple
Implementations
impl Tuple
[src]
pub fn from_struct<T>(value: &T) -> Result<Self, Error> where
T: AsTuple,
[src]
T: AsTuple,
Creates new tuple from value
.
pub fn len(&self) -> u32
[src]
Return the number of fields in tuple (the size of MsgPack Array).
pub fn bsize(&self) -> usize
[src]
Return the number of bytes used to store internal tuple data (MsgPack Array).
pub fn format(&self) -> TupleFormat
[src]
Return the associated format.
pub fn iter(&self) -> Result<TupleIterator, Error>
[src]
Allocate and initialize a new Tuple
iterator. The Tuple
iterator
allow to iterate over fields at root level of MsgPack array.
Example:
let mut it = tuple.iter().unwrap(); while let Some(field) = it.next().unwrap() { // process data } // rewind iterator to first position it.rewind(); assert!(it.position() == 0); // rewind iterator to first position field = it.seek(3).unwrap(); assert!(it.position() == 4);
pub fn field<T>(&self, fieldno: u32) -> Result<Option<T>, Error> where
T: DeserializeOwned,
[src]
T: DeserializeOwned,
Return the raw Tuple field in MsgPack format.
The buffer is valid until next call to box_tuple_* functions.
fieldno
- zero-based index in MsgPack array.
Returns:
None
ifi >= box_tuple_field_count(Tuple)
or if field has a non primitive type- field value otherwise
pub fn into_struct<T>(self) -> Result<T, Error> where
T: DeserializeOwned,
[src]
T: DeserializeOwned,
Trait Implementations
impl Clone for Tuple
[src]
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Drop for Tuple
[src]
impl Into<Tuple> for FunctionArgs
[src]
Auto Trait Implementations
impl RefUnwindSafe for Tuple
impl !Send for Tuple
impl !Sync for Tuple
impl Unpin for Tuple
impl UnwindSafe for Tuple
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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
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>,