Struct syn::LitStr [−][src]
A UTF-8 string literal: "foo"
.
This type is available if Syn is built with the "derive"
or
"full"
feature.
Methods
impl LitStr
[src]
[−]
impl LitStr
pub fn new(value: &str, span: Span) -> Self
[src]
pub fn new(value: &str, span: Span) -> Self
pub fn value(&self) -> String
[src]
pub fn value(&self) -> String
pub fn parse<T: Synom>(&self) -> Result<T, ParseError>
[src]
[−]
pub fn parse<T: Synom>(&self) -> Result<T, ParseError>
Parse a syntax tree node from the content of this string literal.
All spans in the syntax tree will point to the span of this LitStr
.
pub fn span(&self) -> Span
[src]
pub fn span(&self) -> Span
pub fn set_span(&mut self, span: Span)
[src]
pub fn set_span(&mut self, span: Span)
Trait Implementations
impl Synom for LitStr
[src]
[+]
impl Synom for LitStr
impl ToTokens for LitStr
[src]
[+]
impl ToTokens for LitStr
impl Clone for LitStr
[src]
[+]
impl Clone for LitStr
impl From<LitStr> for Lit
[src]
[+]
impl From<LitStr> for Lit