Struct mail::header_components::MessageId
source · pub struct MessageId { /* private fields */ }
Expand description
Implementation Details
This is used for both message-id/content-id, but depending on usage and support for obsolete parts there are two “kind” of id’s one which allows FWS(/CFWS) in some places and one which doesn’t. This implementation only supports the later one.
Implementations§
source§impl MessageId
impl MessageId
sourcepub fn from_unchecked(string: String) -> MessageId
pub fn from_unchecked(string: String) -> MessageId
creates a message id from a string without checking for validity
The string is expected to have the format <left_part> "@" <right_part>
,
i.e. it should not include the "<"
, ">"
surrounding message id’s in
more or less all places they are used.
pub fn new(
left_part: &SoftAsciiStr,
right_part: &SoftAsciiStr
) -> Result<MessageId, ComponentCreationError>
pub fn as_str(&self) -> &str
Trait Implementations§
source§impl<'de> Deserialize<'de> for MessageId
impl<'de> Deserialize<'de> for MessageId
source§fn deserialize<D>(
deserializer: D
) -> Result<MessageId, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D
) -> Result<MessageId, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl EncodableInHeader for MessageId
impl EncodableInHeader for MessageId
fn encode(&self, handle: &mut EncodingWriter<'_>) -> Result<(), EncodingError>
fn boxed_clone(&self) -> Box<dyn EncodableInHeader + 'static, Global>
source§impl<T> HeaderTryFrom<T> for MessageIdwhere
T: HeaderTryInto<Input>,
impl<T> HeaderTryFrom<T> for MessageIdwhere
T: HeaderTryInto<Input>,
source§impl Serialize for MessageId
impl Serialize for MessageId
source§fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more