pub struct Ident {
pub value: String,
pub quote_style: Option<char>,
}
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 with_quote<S>(quote: char, value: S) -> Self
pub fn with_quote<S>(quote: char, value: S) -> Self
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<'de> Deserialize<'de> for Ident
impl<'de> Deserialize<'de> for Ident
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Ord for Ident
impl Ord for Ident
source§impl PartialOrd for Ident
impl PartialOrd for Ident
source§impl VisitMut for Ident
impl VisitMut for Ident
fn visit<V: VisitorMut>(&mut self, visitor: &mut V) -> ControlFlow<V::Break>
impl Eq for Ident
impl StructuralPartialEq for Ident
Auto Trait Implementations§
impl Freeze for Ident
impl RefUnwindSafe for Ident
impl Send for Ident
impl Sync for Ident
impl Unpin for Ident
impl UnwindSafe for Ident
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)