pub struct TemplateChunk {
pub cooked: Option<Wtf8>,
pub raw: String,
pub tail: bool,
}Expand description
One chunk of a TemplateLiteral.
Fields§
§cooked: Option<Wtf8>Escape-expanded text; None when the chunk has an invalid escape
sequence (legal in tagged templates only, where it becomes undefined).
A Wtf8 because a template may hold an unpaired surrogate, just as a string
literal may.
raw: StringSource text, verbatim.
tail: boolWhether this chunk ends with the closing backtick.
Trait Implementations§
Source§impl Clone for TemplateChunk
impl Clone for TemplateChunk
Source§impl Debug for TemplateChunk
impl Debug for TemplateChunk
impl Eq for TemplateChunk
Source§impl PartialEq for TemplateChunk
impl PartialEq for TemplateChunk
impl StructuralPartialEq for TemplateChunk
Auto Trait Implementations§
impl !Send for TemplateChunk
impl !Sync for TemplateChunk
impl Forget for TemplateChunk
impl Freeze for TemplateChunk
impl Move for TemplateChunk
impl RefUnwindSafe for TemplateChunk
impl Unpin for TemplateChunk
impl UnsafeUnpin for TemplateChunkwhere
*const RcInner<[u8]> is !null: UnsafeUnpin,
PhantomData<RcInner<[u8]>>: UnsafeUnpin,
*const RcInner<Vec<u8>> is !null: UnsafeUnpin,
PhantomData<RcInner<Vec<u8>>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
impl UnwindSafe for TemplateChunk
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