#[non_exhaustive]pub struct EmailHeader {
pub name: String,
pub value: String,
pub extra: Map<String, Value>,
}Expand description
A single RFC 5322 header field (RFC 8621 §4.1.3).
The name retains original capitalisation; value is the raw field value.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringThe header field name (e.g. "Content-Type"), case-preserved.
value: StringThe header field value in Raw form.
extra: Map<String, Value>Catch-all for vendor / site / private extension fields not covered by the typed fields above. Preserves unknown fields across deserialize/serialize round-trip per workspace extras-preservation policy (see workspace AGENTS.md).
Implementations§
Source§impl EmailHeader
impl EmailHeader
Trait Implementations§
Source§impl Clone for EmailHeader
impl Clone for EmailHeader
Source§fn clone(&self) -> EmailHeader
fn clone(&self) -> EmailHeader
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 EmailHeader
impl Debug for EmailHeader
Source§impl<'de> Deserialize<'de> for EmailHeader
impl<'de> Deserialize<'de> for EmailHeader
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
impl Eq for EmailHeader
Source§impl PartialEq for EmailHeader
impl PartialEq for EmailHeader
Source§fn eq(&self, other: &EmailHeader) -> bool
fn eq(&self, other: &EmailHeader) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for EmailHeader
impl Serialize for EmailHeader
impl StructuralPartialEq for EmailHeader
Auto Trait Implementations§
impl Freeze for EmailHeader
impl RefUnwindSafe for EmailHeader
impl Send for EmailHeader
impl Sync for EmailHeader
impl Unpin for EmailHeader
impl UnsafeUnpin for EmailHeader
impl UnwindSafe for EmailHeader
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