pub struct StringLiteral {
pub elements: Vec<StringElement>,
pub span: Span,
pub leading_trivia: LeadingTrivia,
pub trailing_trivia: TrailingTrivia,
}Expand description
Struct generated by strutuct! for StringLiteral.
Fields§
§elements: Vec<StringElement>Field StringLiteral::elements generated by strutuct!.
span: SpanField StringLiteral::span generated by strutuct!.
leading_trivia: LeadingTriviaField StringLiteral::leading_trivia generated by strutuct!.
trailing_trivia: TrailingTriviaField StringLiteral::trailing_trivia generated by strutuct!.
Implementations§
Source§impl StringLiteral
impl StringLiteral
Sourcepub fn new(elements: Vec<StringElement>, span: Span) -> Self
pub fn new(elements: Vec<StringElement>, span: Span) -> Self
Creates this node from its typed children.
Trait Implementations§
Source§impl Debug for StringLiteral
impl Debug for StringLiteral
Source§impl From<StringLiteral> for Component
impl From<StringLiteral> for Component
Source§fn from(value: StringLiteral) -> Self
fn from(value: StringLiteral) -> Self
Converts to this type from the input type.
Source§impl From<StringLiteral> for Expr
impl From<StringLiteral> for Expr
Source§fn from(value: StringLiteral) -> Self
fn from(value: StringLiteral) -> Self
Converts to this type from the input type.
Source§impl From<StringLiteral> for ExprLiteral
impl From<StringLiteral> for ExprLiteral
Source§fn from(value: StringLiteral) -> Self
fn from(value: StringLiteral) -> Self
Converts to this type from the input type.
Source§impl From<StringLiteral> for PackedContent
impl From<StringLiteral> for PackedContent
Source§fn from(value: StringLiteral) -> Self
fn from(value: StringLiteral) -> Self
Converts to this type from the input type.
Source§impl Lex for StringLiteral
impl Lex for StringLiteral
Source§fn to_tokens(&self, output: &mut TokenStream)
fn to_tokens(&self, output: &mut TokenStream)
Appends this value’s token trees to
output.Source§fn to_token_stream(&self) -> TokenStream
fn to_token_stream(&self) -> TokenStream
Emits this value into a fresh token stream.
Source§impl<N> Migrate<N> for StringLiteralwhere
N: ExternalCstNode,
impl<N> Migrate<N> for StringLiteralwhere
N: ExternalCstNode,
Source§impl PrettyTree for StringLiteral
impl PrettyTree for StringLiteral
Source§fn pretty_tree(&self) -> PrettyNode
fn pretty_tree(&self) -> PrettyNode
Builds the presentation node for this syntax value.
Source§impl Spanned for StringLiteral
impl Spanned for StringLiteral
Source§impl Terminal for StringLiteral
impl Terminal for StringLiteral
Source§fn leading_trivia(&self) -> &LeadingTrivia
fn leading_trivia(&self) -> &LeadingTrivia
Borrows the comments preceding this terminal.
Source§fn leading_trivia_mut(&mut self) -> &mut LeadingTrivia
fn leading_trivia_mut(&mut self) -> &mut LeadingTrivia
Mutably borrows the comments preceding this terminal.
Source§fn trailing_trivia(&self) -> &TrailingTrivia
fn trailing_trivia(&self) -> &TrailingTrivia
Borrows the comments following this terminal.
Source§fn trailing_trivia_mut(&mut self) -> &mut TrailingTrivia
fn trailing_trivia_mut(&mut self) -> &mut TrailingTrivia
Mutably borrows the comments following this terminal.
Source§fn set_leading_trivia(&mut self, trivia: impl IntoIterator<Item = Trivia>)where
Self: Sized,
fn set_leading_trivia(&mut self, trivia: impl IntoIterator<Item = Trivia>)where
Self: Sized,
Replaces the comments preceding this terminal.
Source§fn set_trailing_trivia(&mut self, trivia: impl IntoIterator<Item = Trivia>)where
Self: Sized,
fn set_trailing_trivia(&mut self, trivia: impl IntoIterator<Item = Trivia>)where
Self: Sized,
Replaces the comments and layout characters following this terminal.
Auto Trait Implementations§
impl Freeze for StringLiteral
impl RefUnwindSafe for StringLiteral
impl Send for StringLiteral
impl Sync for StringLiteral
impl Unpin for StringLiteral
impl UnsafeUnpin for StringLiteral
impl UnwindSafe for StringLiteral
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