[−][src]Struct async_smtp::smtp::client::InnerClient
Structure that implements the SMTP client
Implementations
impl<S: Write + Read> InnerClient<S>[src]
pub fn new() -> InnerClient<S>[src]
Creates a new SMTP client
It does not connects to the server, but only creates the Client
impl<S: Connector + Write + Read + Unpin> InnerClient<S>[src]
pub async fn close<'_>(__arg0: Pin<&'_ mut Self>) -> Result<(), Error>[src]
Closes the SMTP transaction if possible.
pub fn set_stream(&mut self, stream: S)[src]
Sets the underlying stream.
pub async fn upgrade_tls_stream<'_>(
self,
tls_parameters: &'_ ClientTlsParameters
) -> Result<Self>[src]
self,
tls_parameters: &'_ ClientTlsParameters
) -> Result<Self>
Upgrades the underlying connection to SSL/TLS.
pub fn is_encrypted(&self) -> bool[src]
Tells if the underlying stream is currently encrypted
pub fn set_timeout(&mut self, duration: Option<Duration>)[src]
Set read and write timeout.
pub fn timeout(&mut self) -> Option<&Duration>[src]
Get the read and write timeout.
pub async fn connect<'_, '_, '_, A: ToSocketAddrs>(
&'_ mut self,
addr: &'_ A,
timeout: Option<Duration>,
tls_parameters: Option<&'_ ClientTlsParameters>
) -> Result<(), Error>[src]
&'_ mut self,
addr: &'_ A,
timeout: Option<Duration>,
tls_parameters: Option<&'_ ClientTlsParameters>
) -> Result<(), Error>
Connects to the configured server
pub async fn connect_with_stream<'_>(
&'_ mut self,
stream: S
) -> Result<(), Error>[src]
&'_ mut self,
stream: S
) -> Result<(), Error>
Connects to a pre-defined stream
pub fn is_connected(&self) -> bool[src]
Checks if the underlying server socket is connected
pub async fn auth<'_, '_>(
__arg0: Pin<&'_ mut Self>,
mechanism: Mechanism,
credentials: &'_ Credentials
) -> SmtpResult[src]
__arg0: Pin<&'_ mut Self>,
mechanism: Mechanism,
credentials: &'_ Credentials
) -> SmtpResult
Sends an AUTH command with the given mechanism, and handles challenge if needed
pub async fn message<'_, T: Read + Unpin>(
__arg0: Pin<&'_ mut Self>,
message: T
) -> SmtpResult[src]
__arg0: Pin<&'_ mut Self>,
message: T
) -> SmtpResult
Sends the message content.
pub async fn command<'_, C: Display>(
__arg0: Pin<&'_ mut Self>,
command: C
) -> SmtpResult[src]
__arg0: Pin<&'_ mut Self>,
command: C
) -> SmtpResult
Send the given SMTP command to the server.
pub async fn read_response<'_>(__arg0: Pin<&'_ mut Self>) -> SmtpResult[src]
Read an SMTP response from the wire.
Trait Implementations
impl<S: Debug + Write + Read> Debug for InnerClient<S>[src]
impl<S: Write + Read> Default for InnerClient<S>[src]
impl<S: Write + Read> PinnedDrop for InnerClient<S>[src]
impl<'pin, S: Write + Read> Unpin for InnerClient<S> where
__InnerClient<'pin, S>: Unpin, [src]
__InnerClient<'pin, S>: Unpin,
impl<S: Write + Read> UnsafeUnpin for InnerClient<S>[src]
Auto Trait Implementations
impl<S> RefUnwindSafe for InnerClient<S> where
S: RefUnwindSafe,
S: RefUnwindSafe,
impl<S> Send for InnerClient<S> where
S: Send,
S: Send,
impl<S> Sync for InnerClient<S> where
S: Sync,
S: Sync,
impl<S> UnwindSafe for InnerClient<S> where
S: UnwindSafe,
S: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,