pub enum OptionKeySet {
Closed(BTreeSet<MapKey>),
Open(BTreeSet<MapKey>),
Unresolved,
}Expand description
The top-level key universe of a family-declared option map type,
parsed from its stored TypeDecl.rhs. The firing rule below
consumes only the Closed form: an Open or Unresolved set on
the side being asked “is this key legal here” is unrepresentable
as a drifted key, by construction rather than by a runtime flag.
Variants§
Closed(BTreeSet<MapKey>)
A literal map with only literal atom keys.
Open(BTreeSet<MapKey>)
A literal map with at least one wildcard key entry (atom(),
term(), _). The literal keys found alongside the wildcard
are still recorded, for display.
Unresolved
The right-hand side is not a literal map at the top level (a union, or a reference to another type).
Implementations§
Source§impl OptionKeySet
impl OptionKeySet
Sourcepub fn literal_keys(&self) -> &BTreeSet<MapKey>
pub fn literal_keys(&self) -> &BTreeSet<MapKey>
The literal keys this set carries, for either closed or open
forms; empty for Unresolved.
Trait Implementations§
Source§impl Clone for OptionKeySet
impl Clone for OptionKeySet
Source§impl Debug for OptionKeySet
impl Debug for OptionKeySet
impl Eq for OptionKeySet
Source§impl PartialEq for OptionKeySet
impl PartialEq for OptionKeySet
impl StructuralPartialEq for OptionKeySet
Auto Trait Implementations§
impl Forget for OptionKeySet
impl Freeze for OptionKeySet
impl Move for OptionKeySet
impl RefUnwindSafe for OptionKeySet
impl Send for OptionKeySet
impl Sync for OptionKeySet
impl Unpin for OptionKeySet
impl UnsafeUnpin for OptionKeySet
impl UnwindSafe for OptionKeySet
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