Skip to main content

HeaderName

Enum HeaderName 

Source
#[non_exhaustive]
#[repr(u8)]
pub enum HeaderName<'x> {
Show 141 variants Other(Cow<'x, str>), Subject = 0, From = 1, To = 2, Cc = 3, Date = 4, Bcc = 5, ReplyTo = 6, Sender = 7, Comments = 8, InReplyTo = 9, Keywords = 10, Received = 11, MessageId = 12, References = 13, ReturnPath = 14, MimeVersion = 15, ContentDescription = 16, ContentId = 17, ContentLanguage = 18, ContentLocation = 19, ContentTransferEncoding = 20, ContentType = 21, ContentDisposition = 22, ResentTo = 23, ResentFrom = 24, ResentBcc = 25, ResentCc = 26, ResentSender = 27, ResentDate = 28, ResentMessageId = 29, ListArchive = 30, ListHelp = 31, ListId = 32, ListOwner = 33, ListPost = 34, ListSubscribe = 35, ListUnsubscribe = 36, DkimSignature = 38, ArcAuthenticationResults = 39, ArcMessageSignature = 40, ArcSeal = 41, Dkim2Signature = 42, MessageInstance = 43, AcceptLanguage = 44, AlternateRecipient = 45, ArchivedAt = 46, AuthenticationResults = 47, AutoSubmitted = 48, Autoforwarded = 49, Autosubmitted = 50, ContentAlternative = 51, ContentDuration = 52, ContentFeatures = 53, ContentMd5 = 54, ContentTranslationType = 55, Conversion = 56, ConversionWithLoss = 57, DlExpansionHistory = 58, DeferredDelivery = 59, DeliveryDate = 60, DiscardedX400IpmsExtensions = 61, DiscardedX400MtsExtensions = 62, DiscloseRecipients = 63, DispositionNotificationOptions = 64, DispositionNotificationTo = 65, DowngradedFinalRecipient = 66, DowngradedInReplyTo = 67, DowngradedMessageId = 68, DowngradedOriginalRecipient = 69, DowngradedReferences = 70, Encoding = 71, Expires = 72, GenerateDeliveryReport = 73, HpOuter = 74, Importance = 75, IncompleteCopy = 76, Language = 77, LatestDeliveryTime = 78, ListUnsubscribePost = 79, MessageContext = 80, MessageType = 81, MmhsExemptedAddress = 82, MmhsExtendedAuthorisationInfo = 83, MmhsSubjectIndicatorCodes = 84, MmhsHandlingInstructions = 85, MmhsMessageInstructions = 86, MmhsCodressMessageIndicator = 87, MmhsOriginatorReference = 88, MmhsPrimaryPrecedence = 89, MmhsCopyPrecedence = 90, MmhsMessageType = 91, MmhsOtherRecipientsIndicatorTo = 92, MmhsOtherRecipientsIndicatorCc = 93, MmhsAcp127MessageIdentifier = 94, MmhsOriginatorPlad = 95, MtPriority = 96, Organization = 97, OriginalEncodedInformationTypes = 98, OriginalFrom = 99, OriginalMessageId = 100, OriginalRecipient = 101, OriginatorReturnAddress = 102, OriginalSubject = 103, PicsLabel = 104, PreventNonDeliveryReport = 105, Priority = 106, ReceivedSpf = 107, ReplyBy = 108, RequireRecipientValidSince = 109, Sensitivity = 110, Solicitation = 111, Supersedes = 112, TlsReportDomain = 113, TlsReportSubmitter = 114, TlsRequired = 115, VbrInfo = 116, X400ContentIdentifier = 117, X400ContentReturn = 118, X400ContentType = 119, X400MtsIdentifier = 120, X400Originator = 121, X400Received = 122, X400Recipients = 123, X400Trace = 124, ApparentlyTo = 125, Author = 126, CfblAddress = 127, CfblFeedbackId = 128, DeliveredTo = 129, EdiintFeatures = 130, EesstVersion = 131, ErrorsTo = 132, Face = 133, FormSub = 134, JabberId = 135, MmhsAuthorizingUsers = 136, Privicon = 137, SioLabel = 138, SioLabelHistory = 139, WrongRecipient = 140,
}
Expand description

A header field

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Other(Cow<'x, str>)

§

Subject = 0

§

From = 1

§

To = 2

§

Cc = 3

§

Date = 4

§

Bcc = 5

§

ReplyTo = 6

§

Sender = 7

§

Comments = 8

§

InReplyTo = 9

§

Keywords = 10

§

Received = 11

§

MessageId = 12

§

References = 13

§

ReturnPath = 14

§

MimeVersion = 15

§

ContentDescription = 16

§

ContentId = 17

§

ContentLanguage = 18

§

ContentLocation = 19

§

ContentTransferEncoding = 20

§

ContentType = 21

§

ContentDisposition = 22

§

ResentTo = 23

§

ResentFrom = 24

§

ResentBcc = 25

§

ResentCc = 26

§

ResentSender = 27

§

ResentDate = 28

§

ResentMessageId = 29

§

ListArchive = 30

§

ListHelp = 31

§

ListId = 32

§

ListOwner = 33

§

ListPost = 34

§

ListSubscribe = 35

§

ListUnsubscribe = 36

§

DkimSignature = 38

§

ArcAuthenticationResults = 39

§

ArcMessageSignature = 40

§

ArcSeal = 41

§

Dkim2Signature = 42

§

MessageInstance = 43

§

AcceptLanguage = 44

§

AlternateRecipient = 45

§

ArchivedAt = 46

§

AuthenticationResults = 47

§

AutoSubmitted = 48

§

Autoforwarded = 49

§

Autosubmitted = 50

§

ContentAlternative = 51

§

ContentDuration = 52

§

ContentFeatures = 53

§

ContentMd5 = 54

§

ContentTranslationType = 55

§

Conversion = 56

§

ConversionWithLoss = 57

§

DlExpansionHistory = 58

§

DeferredDelivery = 59

§

DeliveryDate = 60

§

DiscardedX400IpmsExtensions = 61

§

DiscardedX400MtsExtensions = 62

§

DiscloseRecipients = 63

§

DispositionNotificationOptions = 64

§

DispositionNotificationTo = 65

§

DowngradedFinalRecipient = 66

§

DowngradedInReplyTo = 67

§

DowngradedMessageId = 68

§

DowngradedOriginalRecipient = 69

§

DowngradedReferences = 70

§

Encoding = 71

§

Expires = 72

§

GenerateDeliveryReport = 73

§

HpOuter = 74

§

Importance = 75

§

IncompleteCopy = 76

§

Language = 77

§

LatestDeliveryTime = 78

§

ListUnsubscribePost = 79

§

MessageContext = 80

§

MessageType = 81

§

MmhsExemptedAddress = 82

§

MmhsExtendedAuthorisationInfo = 83

§

MmhsSubjectIndicatorCodes = 84

§

MmhsHandlingInstructions = 85

§

MmhsMessageInstructions = 86

§

MmhsCodressMessageIndicator = 87

§

MmhsOriginatorReference = 88

§

MmhsPrimaryPrecedence = 89

§

MmhsCopyPrecedence = 90

§

MmhsMessageType = 91

§

MmhsOtherRecipientsIndicatorTo = 92

§

MmhsOtherRecipientsIndicatorCc = 93

§

MmhsAcp127MessageIdentifier = 94

§

MmhsOriginatorPlad = 95

§

MtPriority = 96

§

Organization = 97

§

OriginalEncodedInformationTypes = 98

§

OriginalFrom = 99

§

OriginalMessageId = 100

§

OriginalRecipient = 101

§

OriginatorReturnAddress = 102

§

OriginalSubject = 103

§

PicsLabel = 104

§

PreventNonDeliveryReport = 105

§

Priority = 106

§

ReceivedSpf = 107

§

ReplyBy = 108

§

RequireRecipientValidSince = 109

§

Sensitivity = 110

§

Solicitation = 111

§

Supersedes = 112

§

TlsReportDomain = 113

§

TlsReportSubmitter = 114

§

TlsRequired = 115

§

VbrInfo = 116

§

X400ContentIdentifier = 117

§

X400ContentReturn = 118

§

X400ContentType = 119

§

X400MtsIdentifier = 120

§

X400Originator = 121

§

X400Received = 122

§

X400Recipients = 123

§

X400Trace = 124

§

ApparentlyTo = 125

§

Author = 126

§

CfblAddress = 127

§

CfblFeedbackId = 128

§

DeliveredTo = 129

§

EdiintFeatures = 130

§

EesstVersion = 131

§

ErrorsTo = 132

§

Face = 133

§

FormSub = 134

§

JabberId = 135

§

MmhsAuthorizingUsers = 136

§

Privicon = 137

§

SioLabel = 138

§

SioLabelHistory = 139

§

WrongRecipient = 140

Implementations§

Source§

impl HeaderName<'_>

Source

pub fn into_string(self) -> String

Source

pub fn as_str(&self) -> &str

Source

pub fn len(&self) -> usize

Source

pub fn is_structured(&self) -> bool

Returns true if the default parser yields a structured value for this header.

Source

pub fn is_mime_header(&self) -> bool

Returns true if it is a MIME header.

Source

pub fn is_other(&self) -> bool

Returns true if it is an Other header name

Source

pub fn is_empty(&self) -> bool

Source§

impl<'x> HeaderName<'x>

Source

pub fn parse(data: impl Into<Cow<'x, str>>) -> Option<HeaderName<'x>>

Parse a header name

Source§

impl HeaderName<'_>

Source

pub fn as_static_str(&self) -> &'static str

Source

pub fn id(&self) -> u8

Source

pub fn to_owned(&self) -> HeaderName<'static>

Source

pub fn into_owned(self) -> HeaderName<'static>

Trait Implementations§

Source§

impl<'x> Clone for HeaderName<'x>

Source§

fn clone(&self) -> HeaderName<'x>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'x> Debug for HeaderName<'x>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for HeaderName<'_>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for HeaderName<'_>

Source§

impl<'x> From<&'x str> for HeaderName<'x>

Source§

fn from(value: &'x str) -> Self

Converts to this type from the input type.
Source§

impl<'x> From<Cow<'x, str>> for HeaderName<'x>

Source§

fn from(value: Cow<'x, str>) -> Self

Converts to this type from the input type.
Source§

impl From<HeaderName<'_>> for String

Source§

fn from(header: HeaderName<'_>) -> Self

Converts to this type from the input type.
Source§

impl<'x> From<HeaderName<'x>> for u8

Source§

fn from(name: HeaderName<'x>) -> Self

Converts to this type from the input type.
Source§

impl<'x> From<HeaderName<'x>> for Cow<'x, str>

Source§

fn from(header: HeaderName<'x>) -> Self

Converts to this type from the input type.
Source§

impl From<String> for HeaderName<'_>

Source§

fn from(value: String) -> Self

Converts to this type from the input type.
Source§

impl From<u8> for HeaderName<'_>

Source§

fn from(value: u8) -> Self

Converts to this type from the input type.
Source§

impl Hash for HeaderName<'_>

Source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<'x> Ord for HeaderName<'x>

Source§

fn cmp(&self, other: &HeaderName<'x>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 (const: unstable) · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 (const: unstable) · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for HeaderName<'_>

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl<'x> PartialOrd for HeaderName<'x>

Source§

fn partial_cmp(&self, other: &HeaderName<'x>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Auto Trait Implementations§

§

impl<'x> Freeze for HeaderName<'x>

§

impl<'x> RefUnwindSafe for HeaderName<'x>

§

impl<'x> Send for HeaderName<'x>

§

impl<'x> Sync for HeaderName<'x>

§

impl<'x> Unpin for HeaderName<'x>

§

impl<'x> UnsafeUnpin for HeaderName<'x>

§

impl<'x> UnwindSafe for HeaderName<'x>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.