pub enum ObjectKey {
Bool(bool),
Number(BigInt),
String(String),
Tuple(Tuple<ObjectKey>),
}Expand description
Key-comparable value which implements Eq and Hash.
Eure restricts map keys to four types — String, Bool, Integer,
and Tuple<Key...> — for practical and predictable behavior.
-
Deterministic equality: These types provide stable, well-defined equality and hashing. Types like floats, null, or holes introduce ambiguous or platform-dependent comparison rules.
-
Reliable round-tripping: Keys must serialize and deserialize without losing meaning. Strings, booleans, integers, and tuples have canonical and unambiguous textual forms.
-
Tooling-friendly: This set balances expressiveness and simplicity, making keys easy to validate, index, and reason about across implementations.
Variants§
Trait Implementations§
Source§impl Ord for ObjectKey
impl Ord for ObjectKey
Source§impl ParseObjectKey<'_> for ObjectKey
impl ParseObjectKey<'_> for ObjectKey
Source§fn from_object_key(key: &ObjectKey) -> Result<Self, ParseErrorKind>
fn from_object_key(key: &ObjectKey) -> Result<Self, ParseErrorKind>
Parse an object key from the given ObjectKey reference in the document. Read more
Source§impl<'doc> ParseObjectKey<'doc> for &'doc ObjectKey
impl<'doc> ParseObjectKey<'doc> for &'doc ObjectKey
Source§fn from_object_key(key: &'doc ObjectKey) -> Result<Self, ParseErrorKind>
fn from_object_key(key: &'doc ObjectKey) -> Result<Self, ParseErrorKind>
Parse an object key from the given ObjectKey reference in the document. Read more
Source§impl PartialOrd for ObjectKey
impl PartialOrd for ObjectKey
impl Eq for ObjectKey
impl StructuralPartialEq for ObjectKey
Auto Trait Implementations§
impl Freeze for ObjectKey
impl RefUnwindSafe for ObjectKey
impl Send for ObjectKey
impl Sync for ObjectKey
impl Unpin for ObjectKey
impl UnwindSafe for ObjectKey
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more