pub struct Template<O: SubstParseContext> {
pub elements: Vec<TemplateElement<O>>,
}Fields§
§elements: Vec<TemplateElement<O>>TD::Subst is known not to contain SD::when
Implementations§
Source§impl<'s, O> Template<O>
impl<'s, O> Template<O>
pub fn expand_iter<'c>( elements: impl IntoIterator<Item = &'s TemplateElement<O>>, ctx_in: GeneralContext<'c>, out: &mut O, )
Source§impl<O: SubstParseContext> Template<O>
impl<O: SubstParseContext> Template<O>
pub fn parse_special<S: SpecialParseContext>( input: ParseStream<'_>, special: &mut S, ) -> Result<Self>
Trait Implementations§
Source§impl<O: SubstParseContext> AnalyseRepeat for Template<O>
impl<O: SubstParseContext> AnalyseRepeat for Template<O>
Source§fn analyse_repeat(&self, visitor: &mut RepeatAnalysisVisitor) -> Result<()>
fn analyse_repeat(&self, visitor: &mut RepeatAnalysisVisitor) -> Result<()>
Analyses a template section to be repeated
Source§impl<O> ExpandInfallible<O> for Template<O>
impl<O> ExpandInfallible<O> for Template<O>
fn expand<'c>(&self, ctx_in: GeneralContext<'c>, out: &mut O)
Source§impl<O: SubstParseContext> FindRecogMetas for Template<O>
impl<O: SubstParseContext> FindRecogMetas for Template<O>
Source§fn find_recog_metas(&self, acc: &mut Recognised)
fn find_recog_metas(&self, acc: &mut Recognised)
Search for
fmeta(..) etc. expansions Read moreSource§impl<O: SubstParseContext> Parse for Template<O>
impl<O: SubstParseContext> Parse for Template<O>
fn parse(input: ParseStream<'_>) -> Result<Self>
Auto Trait Implementations§
impl<O> Freeze for Template<O>
impl<O> RefUnwindSafe for Template<O>where
<O as SubstParseContext>::NotInConcat: RefUnwindSafe,
<O as SubstParseContext>::NotInPaste: RefUnwindSafe,
<O as SubstParseContext>::NotInBool: RefUnwindSafe,
<O as SubstParseContext>::BoolOnly: RefUnwindSafe,
<O as SubstParseContext>::DbgContent: RefUnwindSafe,
impl<O> !Send for Template<O>
impl<O> !Sync for Template<O>
impl<O> Unpin for Template<O>where
<O as SubstParseContext>::NotInConcat: Unpin,
<O as SubstParseContext>::NotInPaste: Unpin,
<O as SubstParseContext>::NotInBool: Unpin,
<O as SubstParseContext>::BoolOnly: Unpin,
impl<O> UnwindSafe for Template<O>where
<O as SubstParseContext>::NotInConcat: UnwindSafe,
<O as SubstParseContext>::NotInPaste: UnwindSafe,
<O as SubstParseContext>::NotInBool: UnwindSafe,
<O as SubstParseContext>::BoolOnly: UnwindSafe,
<O as SubstParseContext>::DbgContent: 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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more