pub struct POP3Stream {
pub is_authenticated: bool,
/* private fields */
}
Expand description
The stream to use for interfacing with the POP3 Server.
Fields§
§is_authenticated: bool
Implementations§
Source§impl POP3Stream
impl POP3Stream
Sourcepub async fn connect<A: ToSocketAddrs>(
addr: A,
ssl_context: Option<TlsConnector>,
domain: &str,
) -> Result<POP3Stream>
pub async fn connect<A: ToSocketAddrs>( addr: A, ssl_context: Option<TlsConnector>, domain: &str, ) -> Result<POP3Stream>
Creates a new POP3Stream.
Sourcepub async fn login(&mut self, username: &str, password: &str) -> POP3Result
pub async fn login(&mut self, username: &str, password: &str) -> POP3Result
Login to the POP3 server.
Sourcepub async fn stat(&mut self) -> POP3Result
pub async fn stat(&mut self) -> POP3Result
Gives the current number of messages in the mailbox and the total size in bytes of the mailbox.
pub async fn uidl(&mut self, message_number: Option<i32>) -> POP3Result
Sourcepub async fn list(&mut self, message_number: Option<i32>) -> POP3Result
pub async fn list(&mut self, message_number: Option<i32>) -> POP3Result
List displays a summary of messages where each message number is shown and the size of the message in bytes.
Sourcepub async fn retr(&mut self, message_id: i32) -> POP3Result
pub async fn retr(&mut self, message_id: i32) -> POP3Result
retrieves the message of the message id given.
Sourcepub async fn dele(&mut self, message_id: i32) -> POP3Result
pub async fn dele(&mut self, message_id: i32) -> POP3Result
Delete the message with the given message id.
Sourcepub async fn rset(&mut self) -> POP3Result
pub async fn rset(&mut self) -> POP3Result
This resets the session to its original state.
Sourcepub async fn quit(&mut self) -> POP3Result
pub async fn quit(&mut self) -> POP3Result
Quits the current session.
Sourcepub async fn noop(&mut self) -> POP3Result
pub async fn noop(&mut self) -> POP3Result
Doesn’t do anything. This is usually just used to keep the connection open.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for POP3Stream
impl RefUnwindSafe for POP3Stream
impl Send for POP3Stream
impl Sync for POP3Stream
impl Unpin for POP3Stream
impl UnwindSafe for POP3Stream
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