pub enum Span<T, A> {
Text(T),
Expr(A),
}Expand description
A component of a template, either text or an expression.
Internally, a Template is a Vec of Spans, which correspond to subsequent
expressions.
The spans can be accessed using the Template::spans method.
Variants§
Implementations§
Trait Implementations§
Source§impl<T, A> FromIterator<Span<T, A>> for Template<T, A>
impl<T, A> FromIterator<Span<T, A>> for Template<T, A>
impl<T, A> StructuralPartialEq for Span<T, A>
Auto Trait Implementations§
impl<T, A> Freeze for Span<T, A>
impl<T, A> RefUnwindSafe for Span<T, A>where
T: RefUnwindSafe,
A: RefUnwindSafe,
impl<T, A> Send for Span<T, A>
impl<T, A> Sync for Span<T, A>
impl<T, A> Unpin for Span<T, A>
impl<T, A> UnwindSafe for Span<T, A>where
T: UnwindSafe,
A: UnwindSafe,
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