Trait spacetimedb_sats::de::ProductVisitor
source · pub trait ProductVisitor<'de> {
type Output;
// Required methods
fn product_name(&self) -> Option<&str>;
fn product_len(&self) -> usize;
fn visit_seq_product<A: SeqProductAccess<'de>>(
self,
prod: A
) -> Result<Self::Output, A::Error>;
fn visit_named_product<A: NamedProductAccess<'de>>(
self,
prod: A
) -> Result<Self::Output, A::Error>;
// Provided method
fn product_kind(&self) -> ProductKind { ... }
}
Expand description
A visitor walking through a Deserializer
for products.
Required Associated Types§
Required Methods§
sourcefn product_name(&self) -> Option<&str>
fn product_name(&self) -> Option<&str>
Returns the name of the product, if any.
sourcefn product_len(&self) -> usize
fn product_len(&self) -> usize
Returns the length of the product.
sourcefn visit_seq_product<A: SeqProductAccess<'de>>(
self,
prod: A
) -> Result<Self::Output, A::Error>
fn visit_seq_product<A: SeqProductAccess<'de>>( self, prod: A ) -> Result<Self::Output, A::Error>
The input contains an unnamed product.
sourcefn visit_named_product<A: NamedProductAccess<'de>>(
self,
prod: A
) -> Result<Self::Output, A::Error>
fn visit_named_product<A: NamedProductAccess<'de>>( self, prod: A ) -> Result<Self::Output, A::Error>
The input contains a named product.
Provided Methods§
sourcefn product_kind(&self) -> ProductKind
fn product_kind(&self) -> ProductKind
Returns the kind of the product.
Object Safety§
This trait is not object safe.