Make EmailFormat trait private (#535)

It does not need to be exposed.
This commit is contained in:
Alexis Mousset
2021-02-01 11:11:25 +01:00
committed by GitHub
parent 40c8a9d000
commit a0980d017b
4 changed files with 7 additions and 1 deletions

View File

@@ -1,3 +1,5 @@
//! Email addresses
#[cfg(feature = "serde")]
mod serde;

View File

@@ -1,3 +1,5 @@
//! Error type for email messages
use std::{
error::Error as StdError,
fmt::{self, Display, Formatter},

View File

@@ -265,7 +265,8 @@ use crate::{
const DEFAULT_MESSAGE_ID_DOMAIN: &str = "localhost";
pub trait EmailFormat {
/// Something that can be formatted as an email message
trait EmailFormat {
// Use a writer?
fn format(&self, out: &mut Vec<u8>);
}

View File

@@ -13,6 +13,7 @@ use crate::Transport;
#[allow(missing_debug_implementations)]
#[derive(Clone)]
/// Transport using the SMTP protocol
pub struct SmtpTransport {
#[cfg(feature = "r2d2")]
inner: Pool<SmtpClient>,