pub struct ValueObject {
pub entries: Vec<(String, Value)>,
}Expand description
An ordered sequence of named Values representing a document.
ValueObject is the named counterpart to ValueRecord:
where a record is positional, an object carries a key for each field. It is
the wire form of a #[document] value — typed by the structural
Type::Object — and the only form in which a
document crosses the driver boundary, in either direction. The query
engine builds a ValueObject from a positional record (using the field
names from the embedded model schema) just before handing a
document-stored value to a driver, and raises a driver-decoded object back
to the positional record on the way in. Drivers convert a ValueObject
structurally — to a JSON object, a BSON sub-document, a DynamoDB map —
without needing the schema; the embedded model’s identity never reaches
them.
Entries are kept in insertion order. Keys are not deduplicated; writers always build objects from a schema, so keys are unique by construction.
Fields§
§entries: Vec<(String, Value)>The named field values, in insertion order.
Implementations§
Trait Implementations§
Source§impl Clone for ValueObject
impl Clone for ValueObject
Source§fn clone(&self) -> ValueObject
fn clone(&self) -> ValueObject
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more