pub enum LiteralTableEntry {
Field(Box<LiteralTableFieldEntry>),
Value(Box<LiteralExpression>),
}Expand description
An entry in a literal table.
Variants§
Field(Box<LiteralTableFieldEntry>)
A named field entry (e.g., { field = value })
Value(Box<LiteralExpression>)
A value entry for array-like tables (e.g., { value })
Implementations§
Source§impl LiteralTableEntry
impl LiteralTableEntry
Sourcepub fn from_value(value: impl Into<LiteralExpression>) -> Self
pub fn from_value(value: impl Into<LiteralExpression>) -> Self
Creates a value entry from a literal expression.
Sourcepub fn clear_comments(&mut self)
pub fn clear_comments(&mut self)
Clears all comments from the tokens in this node.
Sourcepub fn clear_whitespaces(&mut self)
pub fn clear_whitespaces(&mut self)
Clears all whitespaces information from the tokens in this node.
Trait Implementations§
Source§impl Clone for LiteralTableEntry
impl Clone for LiteralTableEntry
Source§fn clone(&self) -> LiteralTableEntry
fn clone(&self) -> LiteralTableEntry
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LiteralTableEntry
impl Debug for LiteralTableEntry
Source§impl From<LiteralExpression> for LiteralTableEntry
impl From<LiteralExpression> for LiteralTableEntry
Source§fn from(v: LiteralExpression) -> Self
fn from(v: LiteralExpression) -> Self
Converts to this type from the input type.
Source§impl From<LiteralTableFieldEntry> for LiteralTableEntry
impl From<LiteralTableFieldEntry> for LiteralTableEntry
Source§fn from(v: LiteralTableFieldEntry) -> Self
fn from(v: LiteralTableFieldEntry) -> Self
Converts to this type from the input type.
Source§impl PartialEq for LiteralTableEntry
impl PartialEq for LiteralTableEntry
impl Eq for LiteralTableEntry
impl StructuralPartialEq for LiteralTableEntry
Auto Trait Implementations§
impl Freeze for LiteralTableEntry
impl RefUnwindSafe for LiteralTableEntry
impl Send for LiteralTableEntry
impl Sync for LiteralTableEntry
impl Unpin for LiteralTableEntry
impl UnsafeUnpin for LiteralTableEntry
impl UnwindSafe for LiteralTableEntry
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.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more