Template

Trait Template 

Source
pub trait Template {
    // Required method
    fn format(&self, formatter: &mut TemplateFormatter<'_>) -> Result<()>;
}
Expand description

Represents a printable type or a compiled template containing a placeholder value.

This is analogous to std::fmt::Display, but with customized error handling.

Required Methods§

Source

fn format(&self, formatter: &mut TemplateFormatter<'_>) -> Result<()>

Implementations on Foreign Types§

Source§

impl Template for &str

Source§

fn format(&self, formatter: &mut TemplateFormatter<'_>) -> Result<()>

Source§

impl Template for &BStr

Source§

fn format(&self, formatter: &mut TemplateFormatter<'_>) -> Result<()>

Source§

impl Template for bool

Source§

fn format(&self, formatter: &mut TemplateFormatter<'_>) -> Result<()>

Source§

impl Template for i64

Source§

fn format(&self, formatter: &mut TemplateFormatter<'_>) -> Result<()>

Source§

impl Template for Rc<CommitRef>

Source§

fn format(&self, formatter: &mut TemplateFormatter<'_>) -> Result<()>

Source§

impl Template for String

Source§

fn format(&self, formatter: &mut TemplateFormatter<'_>) -> Result<()>

Source§

impl Template for Vec<WorkspaceRef>

Source§

fn format(&self, formatter: &mut TemplateFormatter<'_>) -> Result<()>

Source§

impl Template for Vec<Rc<CommitRef>>

Source§

fn format(&self, formatter: &mut TemplateFormatter<'_>) -> Result<()>

Source§

impl Template for Vec<String>

Source§

fn format(&self, formatter: &mut TemplateFormatter<'_>) -> Result<()>

Source§

impl Template for Vec<Trailer>

Source§

fn format(&self, formatter: &mut TemplateFormatter<'_>) -> Result<()>

Source§

impl Template for BString

Source§

fn format(&self, formatter: &mut TemplateFormatter<'_>) -> Result<()>

Source§

impl Template for ChangeId

Source§

fn format(&self, formatter: &mut TemplateFormatter<'_>) -> Result<()>

Source§

impl Template for CommitId

Source§

fn format(&self, formatter: &mut TemplateFormatter<'_>) -> Result<()>

Source§

impl Template for Signature

Source§

fn format(&self, formatter: &mut TemplateFormatter<'_>) -> Result<()>

Source§

impl Template for Timestamp

Source§

fn format(&self, formatter: &mut TemplateFormatter<'_>) -> Result<()>

Source§

impl Template for OperationId

Source§

fn format(&self, formatter: &mut TemplateFormatter<'_>) -> Result<()>

Source§

impl Template for TimestampRange

Source§

fn format(&self, formatter: &mut TemplateFormatter<'_>) -> Result<()>

Source§

impl Template for RepoPathBuf

Source§

fn format(&self, formatter: &mut TemplateFormatter<'_>) -> Result<()>

Source§

impl Template for Trailer

Source§

fn format(&self, formatter: &mut TemplateFormatter<'_>) -> Result<()>

Source§

impl Template for ConfigValue

Source§

fn format(&self, formatter: &mut TemplateFormatter<'_>) -> Result<()>

Source§

impl<T: Template + ?Sized> Template for &T

Source§

fn format(&self, formatter: &mut TemplateFormatter<'_>) -> Result<()>

Source§

impl<T: Template + ?Sized> Template for Box<T>

Source§

fn format(&self, formatter: &mut TemplateFormatter<'_>) -> Result<()>

Source§

impl<T: Template> Template for Option<T>

Source§

fn format(&self, formatter: &mut TemplateFormatter<'_>) -> Result<()>

Implementors§