pub struct TemplateStore { /* private fields */ }Expand description
Store for email templates.
Templates are keyed by name and contain subject, text body, and HTML body
with {{variable}} placeholders for substitution.
Implementations§
Source§impl TemplateStore
impl TemplateStore
Sourcepub fn create(&self, template: Template) -> Result<(), SesError>
pub fn create(&self, template: Template) -> Result<(), SesError>
Create a new template.
§Errors
Returns AlreadyExistsException if a template with the same name already exists.
Sourcepub fn update(&self, template: Template) -> Result<(), SesError>
pub fn update(&self, template: Template) -> Result<(), SesError>
Update an existing template.
§Errors
Returns TemplateDoesNotExistException if the template is not found.
Sourcepub fn delete(&self, name: &str)
pub fn delete(&self, name: &str)
Delete a template by name. No error if the template does not exist.
Sourcepub fn list(&self) -> Vec<TemplateMetadata>
pub fn list(&self) -> Vec<TemplateMetadata>
List all templates as metadata.
Trait Implementations§
Source§impl Debug for TemplateStore
impl Debug for TemplateStore
Auto Trait Implementations§
impl Freeze for TemplateStore
impl !RefUnwindSafe for TemplateStore
impl Send for TemplateStore
impl Sync for TemplateStore
impl Unpin for TemplateStore
impl UnsafeUnpin for TemplateStore
impl UnwindSafe for TemplateStore
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