Expand description
An identifier, decomposed into its value or character data and the quote style.
Fields§
§value: String
The value of the identifier without quotes.
quote_style: Option<char>
The starting quote if any. Valid quote characters are the single quote, double quote, backtick, and opening square bracket.
Implementations§
source§impl Ident
impl Ident
sourcepub fn new<S>(value: S) -> Selfwhere
S: Into<String>,
pub fn new<S>(value: S) -> Selfwhere
S: Into<String>,
Create a new identifier with the given value and no quotes.
sourcepub fn with_quote<S>(quote: char, value: S) -> Selfwhere
S: Into<String>,
pub fn with_quote<S>(quote: char, value: S) -> Selfwhere
S: Into<String>,
Create a new quoted identifier with the given quote and value. This function panics if the given quote is not a valid quote character.
Trait Implementations§
source§impl Ord for Ident
impl Ord for Ident
source§impl PartialOrd<Ident> for Ident
impl PartialOrd<Ident> for Ident
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more