pub struct SteamMailServer { /* private fields */ }Expand description
Minimal SMTP server that extracts Steam Guard codes and verification links from incoming emails.
Implementations§
Source§impl SteamMailServer
impl SteamMailServer
Sourcepub async fn new(addr: impl ToSocketAddrs) -> Result<Self>
pub async fn new(addr: impl ToSocketAddrs) -> Result<Self>
Bind to addr and start accepting SMTP connections.
Spawns a background task that handles the SMTP handshake and extracts Steam Guard codes from email bodies.
Sourcepub fn local_addr(&self) -> SocketAddr
pub fn local_addr(&self) -> SocketAddr
The local address this server is bound to.
Sourcepub async fn recv(&mut self) -> Option<SteamMailItem>
pub async fn recv(&mut self) -> Option<SteamMailItem>
Wait for the next item (guard code or verification link) from an email.
Auto Trait Implementations§
impl Freeze for SteamMailServer
impl RefUnwindSafe for SteamMailServer
impl Send for SteamMailServer
impl Sync for SteamMailServer
impl Unpin for SteamMailServer
impl UnsafeUnpin for SteamMailServer
impl UnwindSafe for SteamMailServer
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