Struct mail_headers::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) -> Self
pub fn from_unchecked(string: String) -> Self
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<Self, ComponentCreationError>
pub fn as_str(&self) -> &str
Trait Implementations
sourceimpl EncodableInHeader for MessageId
impl EncodableInHeader for MessageId
fn encode(&self, handle: &mut EncodingWriter<'_>) -> Result<(), EncodingError>
fn boxed_clone(&self) -> Box<dyn EncodableInHeader>
sourceimpl<T> HeaderTryFrom<T> for MessageIdwhere
T: HeaderTryInto<Input>,
impl<T> HeaderTryFrom<T> for MessageIdwhere
T: HeaderTryInto<Input>,
fn try_from(input: T) -> Result<Self, ComponentCreationError>
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