pub struct SmtpMockServer { /* private fields */ }Expand description
A MockProtocolServer wrapper around SmtpServer.
Constructs the SMTP server and spec registry, then delegates to
SmtpServer::start with shutdown-signal integration.
Implementations§
Source§impl SmtpMockServer
impl SmtpMockServer
Sourcepub fn new(config: SmtpConfig) -> Self
pub fn new(config: SmtpConfig) -> Self
Create a new SmtpMockServer with the given configuration.
Trait Implementations§
Source§impl MockProtocolServer for SmtpMockServer
impl MockProtocolServer for SmtpMockServer
Source§fn start<'life0, 'async_trait>(
&'life0 self,
shutdown: Receiver<()>,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn start<'life0, 'async_trait>(
&'life0 self,
shutdown: Receiver<()>,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Start the server, running until the shutdown signal is received. Read more
Source§fn description(&self) -> String
fn description(&self) -> String
Human-readable description for logging (e.g., “gRPC server on port 50051”).
Auto Trait Implementations§
impl Freeze for SmtpMockServer
impl RefUnwindSafe for SmtpMockServer
impl Send for SmtpMockServer
impl Sync for SmtpMockServer
impl Unpin for SmtpMockServer
impl UnsafeUnpin for SmtpMockServer
impl UnwindSafe for SmtpMockServer
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