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
sourceimpl 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
sourceimpl<'de> Deserialize<'de> for MessageId
impl<'de> Deserialize<'de> for MessageId
sourcefn 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
sourceimpl EncodableInHeader for MessageId
impl EncodableInHeader for MessageId
fn encode(&self, handle: &mut EncodingWriter<'_>) -> Result<(), EncodingError>
fn boxed_clone(&self) -> Box<dyn EncodableInHeader + 'static, Global>
sourceimpl<T> HeaderTryFrom<T> for MessageIdwhere
T: HeaderTryInto<Input>,
impl<T> HeaderTryFrom<T> for MessageIdwhere
T: HeaderTryInto<Input>,
fn try_from(input: T) -> Result<MessageId, ComponentCreationError>
sourceimpl Serialize for MessageId
impl Serialize for MessageId
sourcefn 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
impl Eq for MessageId
impl StructuralEq for MessageId
impl StructuralPartialEq for MessageId
Auto Trait Implementations
impl RefUnwindSafe for MessageId
impl Send for MessageId
impl Sync for MessageId
impl Unpin for MessageId
impl UnwindSafe for MessageId
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more