Enum text_template::Piece [−][src]
pub enum Piece<'a> { Text(&'a str), Placeholder { name: &'a str, before: &'a str, after: &'a str, }, }
A piece of template, either text or a placeholder to be substituted.
Variants
Text(&'a str)
Placeholder
Fields of Placeholder
name: &'a str | |
before: &'a str | |
after: &'a str |
Trait Implementations
impl<'a> Clone for Piece<'a>
[src]
impl<'a> Clone for Piece<'a>
fn clone(&self) -> Piece<'a>
[src]
fn clone(&self) -> Piece<'a>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl<'a> PartialEq for Piece<'a>
[src]
impl<'a> PartialEq for Piece<'a>
fn eq(&self, other: &Piece<'a>) -> bool
[src]
fn eq(&self, other: &Piece<'a>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Piece<'a>) -> bool
[src]
fn ne(&self, other: &Piece<'a>) -> bool
This method tests for !=
.
impl<'a> Debug for Piece<'a>
[src]
impl<'a> Debug for Piece<'a>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<'a> Display for Piece<'a>
[src]
impl<'a> Display for Piece<'a>