pub struct Tempmail {
pub username: String,
pub domain: Domain,
}
Expand description
Represents a temporary email address with associated domain for receiving emails.
Fields§
§username: String
The username part of the email address.
domain: Domain
The selected domain for the temporary email.
Implementations§
source§impl Tempmail
impl Tempmail
sourcepub fn new<U>(username: U, domain: Option<Domain>) -> Self
pub fn new<U>(username: U, domain: Option<Domain>) -> Self
Creates a new instance of the Tempmail struct.
sourcepub fn random() -> Self
pub fn random() -> Self
Creates a new instance of the Tempmail struct with random username and domain
sourcepub async fn get_messages(&self) -> TempmailResult<Vec<Message>>
pub async fn get_messages(&self) -> TempmailResult<Vec<Message>>
Fetches the messages in the inbox.
pub async fn get_raw_messages(&self) -> TempmailResult<Vec<RawMessage>>
pub async fn expand_raw_message( &self, raw_message: &RawMessage ) -> TempmailResult<Message>
sourcepub async fn get_attachment<T>(
&self,
message_id: usize,
filename: T
) -> TempmailResult<Vec<u8>>
pub async fn get_attachment<T>( &self, message_id: usize, filename: T ) -> TempmailResult<Vec<u8>>
Fetches the attachment of the specified message_id and filename.
Trait Implementations§
source§impl Ord for Tempmail
impl Ord for Tempmail
source§impl PartialEq for Tempmail
impl PartialEq for Tempmail
source§impl PartialOrd for Tempmail
impl PartialOrd for Tempmail
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for Tempmail
impl Send for Tempmail
impl StructuralPartialEq for Tempmail
impl Sync for Tempmail
Auto Trait Implementations§
impl Freeze for Tempmail
impl RefUnwindSafe for Tempmail
impl Unpin for Tempmail
impl UnwindSafe for Tempmail
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
source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.