Enum koto_parser::StringContents
source · pub enum StringContents {
Literal(ConstantIndex),
Raw {
constant: ConstantIndex,
hash_count: u8,
},
Interpolated(Vec<StringNode>),
}
Expand description
The contents of an AstString
Variants§
Literal(ConstantIndex)
A string literal
Raw
A raw string literal
Fields
§
constant: ConstantIndex
The literal’s constant index
Interpolated(Vec<StringNode>)
An interpolated string
An interpolated string is made up of a series of literals and template expressions, which are then joined together using a string builder.
Trait Implementations§
source§impl Clone for StringContents
impl Clone for StringContents
source§fn clone(&self) -> StringContents
fn clone(&self) -> StringContents
Returns a copy 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 StringContents
impl Debug for StringContents
source§impl PartialEq for StringContents
impl PartialEq for StringContents
source§fn eq(&self, other: &StringContents) -> bool
fn eq(&self, other: &StringContents) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for StringContents
impl StructuralPartialEq for StringContents
Auto Trait Implementations§
impl Freeze for StringContents
impl RefUnwindSafe for StringContents
impl Send for StringContents
impl Sync for StringContents
impl Unpin for StringContents
impl UnwindSafe for StringContents
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