pub enum TemplateEnd {
Closed(usize),
Unterminated(usize),
}Expand description
Where a `…` run ends.
Variants§
Closed(usize)
The run closed. The index is just past the closing backtick, so
&src[open..end] is the whole token, backticks included.
Unterminated(usize)
The line ended, or the text did, before the run closed.
The index is where the run stopped — at the newline, or at the end
of the text — so &src[open..end] is still a bounded token. Bounding it
is the whole point of ADR-094: one typo yields one T002 rather than a
token covering the rest of the file and a cascade behind it.
Trait Implementations§
Source§impl Clone for TemplateEnd
impl Clone for TemplateEnd
Source§fn clone(&self) -> TemplateEnd
fn clone(&self) -> TemplateEnd
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for TemplateEnd
Source§impl Debug for TemplateEnd
impl Debug for TemplateEnd
impl Eq for TemplateEnd
Source§impl PartialEq for TemplateEnd
impl PartialEq for TemplateEnd
impl StructuralPartialEq for TemplateEnd
Auto Trait Implementations§
impl Freeze for TemplateEnd
impl RefUnwindSafe for TemplateEnd
impl Send for TemplateEnd
impl Sync for TemplateEnd
impl Unpin for TemplateEnd
impl UnsafeUnpin for TemplateEnd
impl UnwindSafe for TemplateEnd
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