pub struct Templates { /* private fields */ }Expand description
One provider’s compiled templates.
Implementations§
Source§impl Templates
impl Templates
Sourcepub fn compile(
provider: &'static str,
config: &TemplateConfig,
) -> Result<Option<Self>, SignalError>
pub fn compile( provider: &'static str, config: &TemplateConfig, ) -> Result<Option<Self>, SignalError>
Compiles and checks provider’s templates; None when it has
none. Used at config load, so every error names the offending
key.
Sourcepub fn load(provider: &'static str, config: &TemplateConfig) -> Option<Self>
pub fn load(provider: &'static str, config: &TemplateConfig) -> Option<Self>
Like Templates::compile, for building a provider from a
config that was checked when it loaded. An error here can only
come from a config built by hand; it is logged and the provider
keeps its built-in format.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Templates
impl !RefUnwindSafe for Templates
impl !UnwindSafe for Templates
impl Send for Templates
impl Sync for Templates
impl Unpin for Templates
impl UnsafeUnpin for Templates
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