Skip to main content

Module object

Module object 

Source
Expand description

JSON objects.

A JSON Object is a list of key-value Entry in definition order, not a map: duplicate keys are preserved exactly as they appear in the source. An internal index still gives O(1) average lookup by key, and the *_unique accessors report duplicates as an error instead of silently picking one.

Structs§

Duplicate
Two items sharing the same object key.
Entries
Iterator over the entries of an Object matching a key, yielding &'a Entry.
EntriesWithIndex
Iterator over the entries of an Object matching a key, yielding (usize, &'a Entry).
Entry
Object entry.
IterMapped
Iterator over the entries of an Object, with their code map offsets.
IterMut
Iterator over the entries of an Object, yielding mutable values.
MappedEntries
Iterator over the entries of an Object matching a key, yielding MappedEntry<'a> with code map offsets.
MappedEntriesWithIndex
Iterator over the entries of an Object matching a key, yielding (usize, MappedEntry<'a>) with code map offsets.
MappedValues
Iterator over the entries of an Object matching a key, yielding Mapped<&'a Value> with code map offsets.
MappedValuesWithIndex
Iterator over the entries of an Object matching a key, yielding (usize, Mapped<&'a Value>) with code map offsets.
Object
Object.
RemovedByInsertFront
Iterator over the entries removed by Object::insert_front.
RemovedByInsertion
Iterator over the entries removed by Object::insert.
RemovedEntries
Iterator over the entries removed by Object::remove.
Values
Iterator over the entries of an Object matching a key, yielding &'a Value.
ValuesMut
Mutable iterator over the entries of an Object matching a key, yielding &'a mut Value.
ValuesMutWithIndex
Mutable iterator over the entries of an Object matching a key, yielding (usize, &'a mut Value).
ValuesWithIndex
Iterator over the entries of an Object matching a key, yielding (usize, &'a Value).

Enums§

Indexes
Iterator over the positions of the entries matching a key.

Constants§

KEY_CAPACITY
Object key stack capacity.

Traits§

Equivalent
Key lookup equivalence.

Type Aliases§

DuplicateEntry
Duplicate entry error.
IndexedMappedEntry
A MappedEntry together with its position in the object.
IndexedMappedValue
A mapped entry value together with the entry’s position in the object.
Iter
Iterator over the entries of an Object, in definition order.
Key
Object key.
MappedEntry
Borrowed object entry, with the code map offset of the entry, its key and its value.