Struct fuzz_interact::FuzzConfig
source · [−]pub(crate) struct FuzzConfig;
Trait Implementations
sourceimpl Config for FuzzConfig
impl Config for FuzzConfig
type ConnectionUserMeta = ()
type MailUserMeta = ()
type Protocol = Smtp
sourcefn hostname(&self, _conn_meta: &ConnectionMetadata<()>) -> &str
fn hostname(&self, _conn_meta: &ConnectionMetadata<()>) -> &str
Note: this function is only ever used for the default implementations of
other functions in this trait. As such, it is OK to leave it
unimplemented!()
if other functions are implemented. Read more
fn new_mail<'life0, 'life1, 'async_trait>(
&'life0 self,
_conn_meta: &'life1 mut ConnectionMetadata<()>
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
sourcefn tls_accept<'life0, 'life1, 'async_trait, IO>(
&'life0 self,
_io: IO,
_conn_meta: &'life1 mut ConnectionMetadata<()>
) -> Pin<Box<dyn Future<Output = Result<Duplex<Pin<Box<dyn Send + AsyncRead>>, Pin<Box<dyn Send + AsyncWrite>>>>> + Send + 'async_trait>> where
IO: 'static + Unpin + Send + AsyncRead + AsyncWrite,
IO: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn tls_accept<'life0, 'life1, 'async_trait, IO>(
&'life0 self,
_io: IO,
_conn_meta: &'life1 mut ConnectionMetadata<()>
) -> Pin<Box<dyn Future<Output = Result<Duplex<Pin<Box<dyn Send + AsyncRead>>, Pin<Box<dyn Send + AsyncWrite>>>>> + Send + 'async_trait>> where
IO: 'static + Unpin + Send + AsyncRead + AsyncWrite,
IO: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Note: if you don’t want to implement TLS, you should override
can_do_tls
to return false
so that STARTTLS is not advertized. This
being said, returning an error here should have the same result in
practice, except clients will try STARTTLS and fail Read more
fn filter_from<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
from: Option<Email>,
_meta: &'life1 mut MailMetadata<()>,
_conn_meta: &'life2 mut ConnectionMetadata<()>
) -> Pin<Box<dyn Future<Output = Decision<Option<Email>>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn filter_to<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
to: Email,
_meta: &'life1 mut MailMetadata<()>,
_conn_meta: &'life2 mut ConnectionMetadata<()>
) -> Pin<Box<dyn Future<Output = Decision<Email>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
sourcefn handle_mail<'resp, 'life0, 'life1, 'async_trait, R>(
&'resp self,
reader: &'life0 mut EscapedDataReader<'life1, R>,
mail: MailMetadata<()>,
_conn_meta: &'resp mut ConnectionMetadata<()>
) -> Pin<Box<dyn Future<Output = Decision<()>> + Send + 'async_trait>> where
R: Send + Unpin + AsyncRead,
'resp: 'async_trait,
R: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn handle_mail<'resp, 'life0, 'life1, 'async_trait, R>(
&'resp self,
reader: &'life0 mut EscapedDataReader<'life1, R>,
mail: MailMetadata<()>,
_conn_meta: &'resp mut ConnectionMetadata<()>
) -> Pin<Box<dyn Future<Output = Decision<()>> + Send + 'async_trait>> where
R: Send + Unpin + AsyncRead,
'resp: 'async_trait,
R: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
handle_mail
is an async function that returns either a single decision
in the case of the SMTP protocol, or an async stream of decisions in the
case of the LMTP protocol. Read more
Note: this function is only ever used for the default implementations of
other functions in this trait. As such, it is OK to leave it
unimplemented!()
if other functions are implemented. Read more
Note: this function is only ever used for the default implementations of
other functions in this trait. As such, it is OK to leave it
unimplemented!()
if other functions are implemented. Read more
fn filter_hello<'life0, 'life1, 'async_trait>(
&'life0 self,
is_extended: bool,
hostname: Hostname<String>,
conn_meta: &'life1 mut ConnectionMetadata<Self::ConnectionUserMeta>
) -> Pin<Box<dyn Future<Output = Decision<HelloInfo>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn can_do_tls(
&self,
conn_meta: &ConnectionMetadata<Self::ConnectionUserMeta>
) -> bool
fn filter_data<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
meta: &'life1 mut MailMetadata<Self::MailUserMeta>,
conn_meta: &'life2 mut ConnectionMetadata<Self::ConnectionUserMeta>
) -> Pin<Box<dyn Future<Output = Decision<()>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn handle_rset<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
meta: &'life1 mut Option<MailMetadata<Self::MailUserMeta>>,
conn_meta: &'life2 mut ConnectionMetadata<Self::ConnectionUserMeta>
) -> Pin<Box<dyn Future<Output = Decision<()>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn handle_starttls<'life0, 'life1, 'async_trait>(
&'life0 self,
conn_meta: &'life1 mut ConnectionMetadata<Self::ConnectionUserMeta>
) -> Pin<Box<dyn Future<Output = Decision<()>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn handle_expn<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
name: MaybeUtf8<&'life1 str>,
conn_meta: &'life2 mut ConnectionMetadata<Self::ConnectionUserMeta>
) -> Pin<Box<dyn Future<Output = Decision<()>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn handle_vrfy<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
name: MaybeUtf8<&'life1 str>,
conn_meta: &'life2 mut ConnectionMetadata<Self::ConnectionUserMeta>
) -> Pin<Box<dyn Future<Output = Decision<()>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn handle_help<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
subject: MaybeUtf8<&'life1 str>,
conn_meta: &'life2 mut ConnectionMetadata<Self::ConnectionUserMeta>
) -> Pin<Box<dyn Future<Output = Decision<()>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn handle_noop<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
string: MaybeUtf8<&'life1 str>,
conn_meta: &'life2 mut ConnectionMetadata<Self::ConnectionUserMeta>
) -> Pin<Box<dyn Future<Output = Decision<()>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn handle_quit<'life0, 'life1, 'async_trait>(
&'life0 self,
conn_meta: &'life1 mut ConnectionMetadata<Self::ConnectionUserMeta>
) -> Pin<Box<dyn Future<Output = Decision<()>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn already_did_hello(
&self,
conn_meta: &mut ConnectionMetadata<Self::ConnectionUserMeta>
) -> Reply<String>
fn mail_before_hello(
&self,
conn_meta: &mut ConnectionMetadata<Self::ConnectionUserMeta>
) -> Reply<String>
fn already_in_mail(
&self,
conn_meta: &mut ConnectionMetadata<Self::ConnectionUserMeta>
) -> Reply<String>
fn rcpt_before_mail(
&self,
conn_meta: &mut ConnectionMetadata<Self::ConnectionUserMeta>
) -> Reply<String>
fn data_before_rcpt(
&self,
conn_meta: &mut ConnectionMetadata<Self::ConnectionUserMeta>
) -> Reply<String>
fn data_before_mail(
&self,
conn_meta: &mut ConnectionMetadata<Self::ConnectionUserMeta>
) -> Reply<String>
fn starttls_unsupported(
&self,
conn_meta: &mut ConnectionMetadata<Self::ConnectionUserMeta>
) -> Reply<String>
fn command_unrecognized(
&self,
conn_meta: &mut ConnectionMetadata<Self::ConnectionUserMeta>
) -> Reply<String>
fn pipeline_forbidden_after_starttls(
&self,
conn_meta: &mut ConnectionMetadata<Self::ConnectionUserMeta>
) -> Reply<String>
fn line_too_long(
&self,
conn_meta: &mut ConnectionMetadata<Self::ConnectionUserMeta>
) -> Reply<String>
fn handle_mail_did_not_call_complete(
&self,
conn_meta: &mut ConnectionMetadata<Self::ConnectionUserMeta>
) -> Reply<String>
fn reply_write_timeout(&self) -> Duration
fn command_read_timeout(&self) -> Duration
Auto Trait Implementations
impl RefUnwindSafe for FuzzConfig
impl Send for FuzzConfig
impl Sync for FuzzConfig
impl Unpin for FuzzConfig
impl UnwindSafe for FuzzConfig
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more