Struct spacetimedb_lib::TupleValue
source · pub struct TupleValue {
pub elements: Vec<AlgebraicValue, Global>,
}Fields§
§elements: Vec<AlgebraicValue, Global>Implementations§
source§impl ProductValue
impl ProductValue
pub fn get_field( &self, index: usize, named: Option<&'static str> ) -> Result<&AlgebraicValue, InvalidFieldError>
pub fn field_as_bool( &self, index: usize, named: Option<&'static str> ) -> Result<bool, InvalidFieldError>
pub fn field_as_u32( &self, index: usize, named: Option<&'static str> ) -> Result<u32, InvalidFieldError>
pub fn field_as_i64( &self, index: usize, named: Option<&'static str> ) -> Result<i64, InvalidFieldError>
pub fn field_as_str( &self, index: usize, named: Option<&'static str> ) -> Result<&str, InvalidFieldError>
pub fn field_as_bytes( &self, index: usize, named: Option<&'static str> ) -> Result<&[u8], InvalidFieldError>
source§impl ProductValue
impl ProductValue
pub fn decode<'a>( algebraic_type: &<ProductValue as Value>::Type, bytes: &mut impl BufReader<'a> ) -> Result<ProductValue, DecodeError>
pub fn encode(&self, bytes: &mut impl BufWriter)
Trait Implementations§
source§impl Clone for ProductValue
impl Clone for ProductValue
source§fn clone(&self) -> ProductValue
fn clone(&self) -> ProductValue
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for ProductValue
impl Debug for ProductValue
source§impl FromIterator<AlgebraicValue> for ProductValue
impl FromIterator<AlgebraicValue> for ProductValue
source§fn from_iter<T>(iter: T) -> ProductValuewhere
T: IntoIterator<Item = AlgebraicValue>,
fn from_iter<T>(iter: T) -> ProductValuewhere T: IntoIterator<Item = AlgebraicValue>,
Creates a value from an iterator. Read more
source§impl Hash for ProductValue
impl Hash for ProductValue
source§impl Ord for ProductValue
impl Ord for ProductValue
source§fn cmp(&self, other: &ProductValue) -> Ordering
fn cmp(&self, other: &ProductValue) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq<ProductValue> for ProductValue
impl PartialEq<ProductValue> for ProductValue
source§fn eq(&self, other: &ProductValue) -> bool
fn eq(&self, other: &ProductValue) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl PartialOrd<ProductValue> for ProductValue
impl PartialOrd<ProductValue> for ProductValue
source§fn partial_cmp(&self, other: &ProductValue) -> Option<Ordering>
fn partial_cmp(&self, other: &ProductValue) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moresource§impl Serialize for ProductValue
impl Serialize for ProductValue
source§fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>( &self, serializer: S ) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where S: Serializer,
Serialize this value into the given Serde serializer. Read more