Struct tarantool::tuple::TupleBuffer

source ·
pub struct TupleBuffer(/* private fields */);
Expand description

TupleBuffer Buffer containing tuple contents (MsgPack array)

Implementations§

source§

impl TupleBuffer

source

pub fn as_ptr(&self) -> *const u8

Get raw pointer to buffer.

source

pub fn len(&self) -> usize

Return the number of bytes used in memory by the tuple.

source

pub fn is_empty(&self) -> bool

source

pub unsafe fn from_vec_unchecked(buf: Vec<u8>) -> Self

§Safety

buf must be a valid message pack array

source

pub fn try_from_vec(data: Vec<u8>) -> Result<Self>

Trait Implementations§

source§

impl AsRef<[u8]> for TupleBuffer

source§

fn as_ref(&self) -> &[u8]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl Clone for TupleBuffer

source§

fn clone(&self) -> TupleBuffer

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TupleBuffer

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for TupleBuffer

source§

fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where D: Deserializer<'de>,

source§

impl From<&Tuple> for TupleBuffer

source§

fn from(t: &Tuple) -> Self

Converts to this type from the input type.
source§

impl From<&TupleBuffer> for Tuple

source§

fn from(buf: &TupleBuffer) -> Self

Converts to this type from the input type.
source§

impl From<Tuple> for TupleBuffer

source§

fn from(t: Tuple) -> Self

Converts to this type from the input type.
source§

impl From<TupleBuffer> for Vec<u8>

source§

fn from(b: TupleBuffer) -> Self

Converts to this type from the input type.
source§

impl<L> LuaRead<L> for TupleBuffer
where L: AsLua,

source§

fn lua_read_at_position(lua: L, index: NonZeroI32) -> ReadResult<Self, L>

Reads the data from Lua at a given position.
source§

fn n_values_expected() -> i32

source§

fn lua_read(lua: L) -> Result<Self, (L, WrongType)>

Reads the data from Lua.
source§

fn lua_read_at_maybe_zero_position( lua: L, index: i32 ) -> Result<Self, (L, WrongType)>
where L: AsLua,

source§

impl PartialEq for TupleBuffer

source§

fn eq(&self, other: &TupleBuffer) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Return for TupleBuffer

source§

fn ret(self, ctx: FunctionCtx) -> c_int

source§

impl Serialize for TupleBuffer

source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

source§

impl ToTupleBuffer for TupleBuffer

source§

fn to_tuple_buffer(&self) -> Result<TupleBuffer>

source§

fn tuple_data(&self) -> Option<&[u8]>

Returns a slice of bytes represeting the underlying tarantool tuple. Read more
source§

fn write_tuple_data(&self, w: &mut impl Write) -> Result<()>

source§

impl TryFrom<Vec<u8>> for TupleBuffer

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(data: Vec<u8>) -> Result<Self>

Performs the conversion.
source§

impl Eq for TupleBuffer

source§

impl StructuralPartialEq for TupleBuffer

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoClones<(T,)> for T
where T: Clone,

source§

impl<T> IntoClones<(T, T)> for T
where T: Clone,

source§

impl<T> IntoClones<(T, T, T)> for T
where T: Clone,

source§

impl<T> IntoClones<(T, T, T, T)> for T
where T: Clone,

source§

impl<T> IntoClones<(T, T, T, T, T)> for T
where T: Clone,

source§

impl<T> IntoClones<(T, T, T, T, T, T)> for T
where T: Clone,

source§

impl<T> IntoClones<(T, T, T, T, T, T, T)> for T
where T: Clone,

source§

impl<T> IntoClones<(T, T, T, T, T, T, T, T)> for T
where T: Clone,

source§

impl<T> IntoClones<(T, T, T, T, T, T, T, T, T)> for T
where T: Clone,

source§

impl<T> IntoClones<(T, T, T, T, T, T, T, T, T, T)> for T
where T: Clone,

source§

impl<T> IntoClones<(T, T, T, T, T, T, T, T, T, T, T)> for T
where T: Clone,

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.