Struct spacetimedb_lib::type_def::TupleDef
source · pub struct TupleDef {
pub elements: Vec<ProductTypeElement, Global>,
}Fields§
§elements: Vec<ProductTypeElement, Global>Implementations§
source§impl ProductType
impl ProductType
pub fn new(elements: Vec<ProductTypeElement, Global>) -> ProductType
source§impl ProductType
impl ProductType
pub fn make_meta_type() -> AlgebraicType
pub fn as_value(&self) -> AlgebraicValue
pub fn from_value( value: &AlgebraicValue ) -> Result<ProductType, ValueDeserializeError>
source§impl ProductType
impl ProductType
pub fn decode<'a>( bytes: &mut impl BufReader<'a> ) -> Result<ProductType, DecodeError>
pub fn encode(&self, bytes: &mut impl BufWriter)
Trait Implementations§
source§impl Clone for ProductType
impl Clone for ProductType
source§fn clone(&self) -> ProductType
fn clone(&self) -> ProductType
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 ProductType
impl Debug for ProductType
source§impl<'de> Deserialize<'de> for ProductType
impl<'de> Deserialize<'de> for ProductType
fn deserialize<D>( deserializer: D ) -> Result<ProductType, <D as Deserializer<'de>>::Error>where D: Deserializer<'de>,
source§impl<'de> Deserialize<'de> for ProductType
impl<'de> Deserialize<'de> for ProductType
source§fn deserialize<D>(
deserializer: D
) -> Result<ProductType, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>( deserializer: D ) -> Result<ProductType, <D as Deserializer<'de>>::Error>where D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<'a> FromIterator<(&'a str, AlgebraicType)> for ProductType
impl<'a> FromIterator<(&'a str, AlgebraicType)> for ProductType
source§fn from_iter<T>(iter: T) -> ProductTypewhere
T: IntoIterator<Item = (&'a str, AlgebraicType)>,
fn from_iter<T>(iter: T) -> ProductTypewhere T: IntoIterator<Item = (&'a str, AlgebraicType)>,
Creates a value from an iterator. Read more
source§impl FromIterator<ProductTypeElement> for ProductType
impl FromIterator<ProductTypeElement> for ProductType
source§fn from_iter<T>(iter: T) -> ProductTypewhere
T: IntoIterator<Item = ProductTypeElement>,
fn from_iter<T>(iter: T) -> ProductTypewhere T: IntoIterator<Item = ProductTypeElement>,
Creates a value from an iterator. Read more
source§impl Ord for ProductType
impl Ord for ProductType
source§fn cmp(&self, other: &ProductType) -> Ordering
fn cmp(&self, other: &ProductType) -> 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<ProductType> for ProductType
impl PartialEq<ProductType> for ProductType
source§fn eq(&self, other: &ProductType) -> bool
fn eq(&self, other: &ProductType) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl PartialOrd<ProductType> for ProductType
impl PartialOrd<ProductType> for ProductType
source§fn partial_cmp(&self, other: &ProductType) -> Option<Ordering>
fn partial_cmp(&self, other: &ProductType) -> 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 ProductType
impl Serialize for ProductType
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