pub struct MemoryConfig {
pub sender: EmailAddress,
}Available on crate feature
memory only.Fields§
§sender: EmailAddressImplementations§
Source§impl MemoryConfig
impl MemoryConfig
Sourcepub fn new(sender: impl Into<EmailAddress>) -> Self
pub fn new(sender: impl Into<EmailAddress>) -> Self
Generates a new MemoryConfig.
§Parameters
sender: AStringthat will be used as the sender of theMemoryConfig.
§Returns
A new instance of MemoryConfig with the sender property set to the provided String.
§Examples
use email_clients::clients::memory::MemoryConfig;
let config = MemoryConfig::new("sender@example.com");
assert_eq!(config.sender.to_string(), "sender@example.com");Trait Implementations§
Source§impl Clone for MemoryConfig
impl Clone for MemoryConfig
Source§fn clone(&self) -> MemoryConfig
fn clone(&self) -> MemoryConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MemoryConfig
impl Debug for MemoryConfig
Source§impl Default for MemoryConfig
impl Default for MemoryConfig
Source§fn default() -> MemoryConfig
fn default() -> MemoryConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for MemoryConfig
impl<'de> Deserialize<'de> for MemoryConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<MemoryConfig> for EmailConfiguration
impl From<MemoryConfig> for EmailConfiguration
Source§fn from(value: MemoryConfig) -> Self
fn from(value: MemoryConfig) -> Self
Implementation of From trait to convert MemoryConfig into EmailConfiguration
§Example
let memory_config = MemoryConfig::new("sender@example.com");
let email_config: EmailConfiguration = memory_config.into();Source§impl From<String> for MemoryConfig
impl From<String> for MemoryConfig
Source§fn from(value: String) -> Self
fn from(value: String) -> Self
Converts a String into a MemoryConfig.
§Parameters
value: AStringvalue which will be used to initialize aMemoryConfiginstance.
§Returns
A new instance of MemoryConfig with the sender property set to the provided String.
§Examples
use email_clients::clients::memory::MemoryConfig;
let value = String::from("sender@example.com");
let config = MemoryConfig::from(value);
assert_eq!(config.sender.to_string(), "sender@example.com");Source§impl PartialEq for MemoryConfig
impl PartialEq for MemoryConfig
Source§fn eq(&self, other: &MemoryConfig) -> bool
fn eq(&self, other: &MemoryConfig) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for MemoryConfig
impl PartialOrd for MemoryConfig
Source§impl Serialize for MemoryConfig
impl Serialize for MemoryConfig
impl StructuralPartialEq for MemoryConfig
Auto Trait Implementations§
impl Freeze for MemoryConfig
impl RefUnwindSafe for MemoryConfig
impl Send for MemoryConfig
impl Sync for MemoryConfig
impl Unpin for MemoryConfig
impl UnsafeUnpin for MemoryConfig
impl UnwindSafe for MemoryConfig
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