pub trait Tuplable: Valuable {
// Required method
fn definition(&self) -> TupleDef;
}
Expand description
A tuple-like Valuable
sub-type.
Implemented by Valuable
types that have a tuple-like shape. Fields are
always unnamed. Values that implement Tuplable
must return
Value::Tuplable
from their Valuable::as_value
implementation.
It is uncommon for users to implement this type as the crate provides
implementations of Tuplable
for Rust tuples.
Inspecting
Inspecting fields contained by a Tuplable
instance is done by visiting the
tuple. When visiting a Tuple
, the visit_unnamed_fields()
method is
called. When the tuple is statically defined, visit_unnamed_fields()
is
called once with the values of all the fields. A dynamic tuple
implementation may call visit_unnamed_fields()
multiple times.