pub enum SourceKey {
Ident(Identifier),
Extension(Identifier),
String(String),
Integer(i64),
Tuple(Vec<SourceKey>),
TupleIndex(u8),
}Expand description
A key in source representation.
This determines how the key should be rendered in the output.
Variants§
Ident(Identifier)
Bare identifier: foo, bar_baz
Extension(Identifier)
Extension namespace: $variant, $eure
String(String)
Quoted string key: "hello world"
Integer(i64)
Integer key: 123
Tuple(Vec<SourceKey>)
Tuple key: (1, "a")
TupleIndex(u8)
Tuple index: #0, #1
Trait Implementations§
Source§impl From<Identifier> for SourceKey
impl From<Identifier> for SourceKey
Source§fn from(id: Identifier) -> Self
fn from(id: Identifier) -> Self
Converts to this type from the input type.
impl Eq for SourceKey
impl StructuralPartialEq for SourceKey
Auto Trait Implementations§
impl Freeze for SourceKey
impl RefUnwindSafe for SourceKey
impl Send for SourceKey
impl Sync for SourceKey
impl Unpin for SourceKey
impl UnwindSafe for SourceKey
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
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
Compare self to
key and return true if they are equal.