Struct fv_template::ct::Template
source · pub struct Template { /* private fields */ }Expand description
A compile-time field value template.
Implementations§
source§impl Template
impl Template
sourcepub fn parse2(input: TokenStream) -> Result<Self, Error>
pub fn parse2(input: TokenStream) -> Result<Self, Error>
Parse a template from a TokenStream.
The TokenStream is typically all the tokens given to a macro.
sourcepub fn before_template_field_values<'a>(
&'a self
) -> impl Iterator<Item = &'a FieldValue>
pub fn before_template_field_values<'a>( &'a self ) -> impl Iterator<Item = &'a FieldValue>
Field values that appear before the template string literal.
sourcepub fn template_field_values<'a>(
&'a self
) -> impl Iterator<Item = &'a FieldValue>
pub fn template_field_values<'a>( &'a self ) -> impl Iterator<Item = &'a FieldValue>
Field values that appear within the template string literal.
sourcepub fn after_template_field_values<'a>(
&'a self
) -> impl Iterator<Item = &'a FieldValue>
pub fn after_template_field_values<'a>( &'a self ) -> impl Iterator<Item = &'a FieldValue>
Field values that appear after the template string literal.
sourcepub fn to_rt_tokens(&self, base: TokenStream) -> TokenStream
pub fn to_rt_tokens(&self, base: TokenStream) -> TokenStream
Generate a TokenStream that constructs a runtime representation of this template.
Auto Trait Implementations§
impl RefUnwindSafe for Template
impl !Send for Template
impl !Sync for Template
impl Unpin for Template
impl UnwindSafe for Template
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