pub enum PartialObjectKey {
Number(BigInt),
String(String),
Hole(Option<Identifier>),
Tuple(Tuple<PartialObjectKey>),
}Expand description
A key that may be a hole (unresolved placeholder) or a fully resolved key.
This is a superset of ObjectKey used exclusively in [PartialMap] nodes.
§Equality Semantics
Equality is label-based: Hole(Some("a")) == Hole(Some("a")) is true,
enabling structural document comparison (e.g., in assert_eq!).
This is syntactic equality only — it does not imply semantic interchangeability.
Anonymous holes (Hole(None)) still compare equal for structural equality,
but lookup operations treat them as unique placeholders that never deduplicate.
Labeled holes (Hole(Some(label))) are deduplicated by label.
Variants§
Number(BigInt)
String(String)
Hole(Option<Identifier>)
An unresolved hole key: ! (None) or !label (Some(label)).
Tuple(Tuple<PartialObjectKey>)
A tuple key that may contain holes.
Implementations§
Source§impl PartialObjectKey
impl PartialObjectKey
Sourcepub fn contains_anonymous_hole(&self) -> bool
pub fn contains_anonymous_hole(&self) -> bool
Returns true when this key contains an anonymous hole anywhere within it.
Anonymous holes are syntactically comparable, but they are never deduplicated when looking up PartialMap entries.
Trait Implementations§
Source§impl Clone for PartialObjectKey
impl Clone for PartialObjectKey
Source§fn clone(&self) -> PartialObjectKey
fn clone(&self) -> PartialObjectKey
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PartialObjectKey
impl Debug for PartialObjectKey
Source§impl Display for PartialObjectKey
impl Display for PartialObjectKey
Source§impl From<ObjectKey> for PartialObjectKey
impl From<ObjectKey> for PartialObjectKey
Source§impl Hash for PartialObjectKey
impl Hash for PartialObjectKey
Source§impl PartialEq for PartialObjectKey
impl PartialEq for PartialObjectKey
Source§impl TryFrom<PartialObjectKey> for ObjectKey
impl TryFrom<PartialObjectKey> for ObjectKey
Source§type Error = HoleKeyError
type Error = HoleKeyError
impl Eq for PartialObjectKey
impl StructuralPartialEq for PartialObjectKey
Auto Trait Implementations§
impl Freeze for PartialObjectKey
impl RefUnwindSafe for PartialObjectKey
impl Send for PartialObjectKey
impl Sync for PartialObjectKey
impl Unpin for PartialObjectKey
impl UnsafeUnpin for PartialObjectKey
impl UnwindSafe for PartialObjectKey
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.