pub struct Placeholder<'a> {
pub index: u32,
pub suffix: &'a str,
pub span: Span,
}Expand description
An atomic backtick-delimited template placeholder node (see
ParserOptions::template_placeholder),
carrying the parsed decimal index. Appears in value, selector, and
statement positions where a downstream formatter substitutes interpolations.
Fields§
§index: u32§suffix: &'a strAn ident-continuation run glued directly after the placeholder
(`PLACEHOLDER-0`px -> index 0, suffix "px"), empty when none.
Mirrors #{$x}px being a single identifier rather than two tokens.
span: SpanTrait Implementations§
Source§impl<'a> Debug for Placeholder<'a>
impl<'a> Debug for Placeholder<'a>
Source§impl<'a> From<(Placeholder<'a>, Span)> for Placeholder<'a>
impl<'a> From<(Placeholder<'a>, Span)> for Placeholder<'a>
Source§fn from((token, span): (Placeholder<'a>, Span)) -> Self
fn from((token, span): (Placeholder<'a>, Span)) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'a> Freeze for Placeholder<'a>
impl<'a> RefUnwindSafe for Placeholder<'a>
impl<'a> Send for Placeholder<'a>
impl<'a> Sync for Placeholder<'a>
impl<'a> Unpin for Placeholder<'a>
impl<'a> UnsafeUnpin for Placeholder<'a>
impl<'a> UnwindSafe for Placeholder<'a>
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