Skip to main content

HeaderName

Enum HeaderName 

Source
#[non_exhaustive]
pub enum HeaderName<'x> {
Show 253 variants Subject, From, To, Cc, Date, Bcc, ReplyTo, Sender, Comments, InReplyTo, Keywords, Received, MessageId, References, ReturnPath, MimeVersion, ContentDescription, ContentId, ContentLanguage, ContentLocation, ContentTransferEncoding, ContentType, ContentDisposition, ResentTo, ResentFrom, ResentBcc, ResentCc, ResentSender, ResentDate, ResentMessageId, ListArchive, ListHelp, ListId, ListOwner, ListPost, ListSubscribe, ListUnsubscribe, DkimSignature, ArcAuthenticationResults, ArcMessageSignature, ArcSeal, Dkim2Signature, MessageInstance, AcceptLanguage, AlternateRecipient, ArchivedAt, AuthenticationResults, AutoSubmitted, Autoforwarded, Autosubmitted, ContentAlternative, ContentDuration, ContentFeatures, ContentMd5, ContentTranslationType, Conversion, ConversionWithLoss, DlExpansionHistory, DeferredDelivery, DeliveryDate, DiscardedX400IpmsExtensions, DiscardedX400MtsExtensions, DiscloseRecipients, DispositionNotificationOptions, DispositionNotificationTo, DowngradedFinalRecipient, DowngradedInReplyTo, DowngradedMessageId, DowngradedOriginalRecipient, DowngradedReferences, Encoding, Expires, GenerateDeliveryReport, HpOuter, Importance, IncompleteCopy, Language, LatestDeliveryTime, ListUnsubscribePost, MessageContext, MessageType, MmhsExemptedAddress, MmhsExtendedAuthorisationInfo, MmhsSubjectIndicatorCodes, MmhsHandlingInstructions, MmhsMessageInstructions, MmhsCodressMessageIndicator, MmhsOriginatorReference, MmhsPrimaryPrecedence, MmhsCopyPrecedence, MmhsMessageType, MmhsOtherRecipientsIndicatorTo, MmhsOtherRecipientsIndicatorCc, MmhsAcp127MessageIdentifier, MmhsOriginatorPlad, MtPriority, Organization, OriginalEncodedInformationTypes, OriginalFrom, OriginalMessageId, OriginalRecipient, OriginatorReturnAddress, OriginalSubject, PicsLabel, PreventNonDeliveryReport, Priority, ReceivedSpf, ReplyBy, RequireRecipientValidSince, Sensitivity, Solicitation, Supersedes, TlsReportDomain, TlsReportSubmitter, TlsRequired, VbrInfo, X400ContentIdentifier, X400ContentReturn, X400ContentType, X400MtsIdentifier, X400Originator, X400Received, X400Recipients, X400Trace, ApparentlyTo, Author, CfblAddress, CfblFeedbackId, DeliveredTo, EdiintFeatures, EesstVersion, ErrorsTo, Face, FormSub, JabberId, MmhsAuthorizingUsers, Privicon, SioLabel, SioLabelHistory, WrongRecipient, XOriginalTo, ReturnReceiptTo, XSpamStatus, XSpamScore, XSpamFlag, XSpamResult, XPriority, XMSMailPriority, XMailer, UserAgent, XMimeOLE, XOriginatingIp, XForwardedTo, XForwardedFor, XAutoResponseSuppress, Precedence, ThreadIndex, ThreadTopic, FeedbackId, XUniversallyUniqueIdentifier, XVirusScanned, XMailFrom, XMailmanVersion, MessageIdHash, XMessageIdHash, XMailmanRuleMisses, XSpamLevel, XReceived, XGmMessageState, XGoogleDkimSignature, XMailboxLine, XGmGg, XOriginalFrom, XGoogleSmtpSource, XMsTnefCorrelator, XMsHasAttach, XMeProxy, XMeProxyCause, XMeSender, XGmFeatures, XMsExchangeTransportCrossTenantHeadersStamped, XMsPublicTrafficType, XOriginatorOrg, XMsExchangeCrossTenantNetworkMessageId, XMsExchangeCrossTenantAuthSource, XMsExchangeCrossTenantAuthAs, XMsExchangeCrossTenantOriginalArrivalTime, XMicrosoftAntispam, XMsExchangeCrossTenantId, XMsTrafficTypeDiagnostic, XMicrosoftAntispamMessageInfo, XMsOffice365FilteringCorrelationId, XMsExchangeCrossTenantFromEntityHeader, XMsExchangeAntiSpamMessageDataChunkCount, XMsExchangeAntiSpamMessageData0, XMsExchangeSenderADCheck, XForefrontAntispamReport, XMsExchangeAntiSpamRelay, XMsExchangeCrossTenantMailboxType, XMsExchangeCrossTenantUserPrincipalName, XGitHubReason, XGitHubRecipientAddress, XGitHubRecipient, Destinations, XGitHubSender, XGitHubNotifyPlatform, XThreadId, XSesOutgoing, XProofpointVirusVersion, XGitHubAssignees, XGitHubLabels, BimiSelector, XStripeEid, XAttachmentId, XTestIDTracker, XIetfIDTracker, XPmMessageId, XAntiAbuse, Autocrypt, XComplaintsTo, XProofpointOrigGuid, XProofpointGuid, XGitHubIssueState, XMsReactions, XPmMtaPool, XPmRcpt, XProofpointSpamDetailsEnc, XPmMessageOptions, XSenderId, XGitHubPullRequestStatus, XAuthorityAnalysis, XForwardedEncrypted, XMsExchangeAntiSpamExternalHopMessageDataChunkCount, XMsExchangeAntiSpamExternalHopMessageData0, XMsExchangeCrossTenantRmsPersistedConsumerOrg, XExchangeRoutingPolicyChecked, XMsExchangeCrossTenantOriginalAttributedTenantConnectingIp, XMsExchangeMessageSentRepresentingType, XMsExchangeTransportCrossTenantHeadersStripped, XMsOffice365FilteringCorrelationIdPrvs, XMicrosoftAntispamMessageInfoOriginal, XMsExchangeAuthenticationResults, XForefrontAntispamReportUntrusted, XMsExchangeAtpMessageProperties, XMicrosoftAntispamUntrusted, XMsExchangeAntiSpamMessageData1, XMissiveId, XIadbIpReverse, XReportAbuse, DkimFilter, XMeReceived, XProofpointSpamDetails, Other(Cow<'x, str>),
}
Expand description

A header field name: one of the known names, or any other name with its original spelling.

Names compare ASCII case-insensitively, so Other("x-custom") equals Other("X-Custom"), and an Other spelled like a known name equals, hashes and orders as that name. Known names are parsed into their variant by HeaderName::parse, by the From conversions (which keep any other string as written in Other) and by the message parser, and keep their canonical spelling in HeaderName::as_str; crate::Header::raw_name gives the spelling used in a message.

use mail_parser::HeaderName;

assert_eq!(HeaderName::parse("content-type"), Some(HeaderName::ContentType));
assert_eq!(HeaderName::ContentType.as_str(), "Content-Type");
let custom = HeaderName::parse("X-Custom").expect("valid name");
assert!(custom.is_other());
assert_eq!(custom, HeaderName::from("x-custom"));

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.
§

Subject

Subject.

§

From

From.

§

To

To.

§

Cc

Cc.

§

Date

Date.

§

Bcc

Bcc.

§

ReplyTo

Reply-To.

§

Sender

Sender.

§

Comments

Comments.

§

InReplyTo

In-Reply-To.

§

Keywords

Keywords.

§

Received

Received.

§

MessageId

Message-ID.

§

References

References.

§

ReturnPath

Return-Path.

§

MimeVersion

MIME-Version.

§

ContentDescription

Content-Description.

§

ContentId

Content-ID.

§

ContentLanguage

Content-Language.

§

ContentLocation

Content-Location.

§

ContentTransferEncoding

Content-Transfer-Encoding.

§

ContentType

Content-Type.

§

ContentDisposition

Content-Disposition.

§

ResentTo

Resent-To.

§

ResentFrom

Resent-From.

§

ResentBcc

Resent-Bcc.

§

ResentCc

Resent-Cc.

§

ResentSender

Resent-Sender.

§

ResentDate

Resent-Date.

§

ResentMessageId

Resent-Message-ID.

§

ListArchive

List-Archive.

§

ListHelp

List-Help.

§

ListId

List-ID.

§

ListOwner

List-Owner.

§

ListPost

List-Post.

§

ListSubscribe

List-Subscribe.

§

ListUnsubscribe

List-Unsubscribe.

§

DkimSignature

DKIM-Signature.

§

ArcAuthenticationResults

ARC-Authentication-Results.

§

ArcMessageSignature

ARC-Message-Signature.

§

ArcSeal

ARC-Seal.

§

Dkim2Signature

DKIM2-Signature.

§

MessageInstance

Message-Instance.

§

AcceptLanguage

Accept-Language.

§

AlternateRecipient

Alternate-Recipient.

§

ArchivedAt

Archived-At.

§

AuthenticationResults

Authentication-Results.

§

AutoSubmitted

Auto-Submitted.

§

Autoforwarded

Autoforwarded.

§

Autosubmitted

Autosubmitted.

§

ContentAlternative

Content-Alternative.

§

ContentDuration

Content-Duration.

§

ContentFeatures

Content-features.

§

ContentMd5

Content-MD5.

§

ContentTranslationType

Content-Translation-Type.

§

Conversion

Conversion.

§

ConversionWithLoss

Conversion-With-Loss.

§

DlExpansionHistory

DL-Expansion-History.

§

DeferredDelivery

Deferred-Delivery.

§

DeliveryDate

Delivery-Date.

§

DiscardedX400IpmsExtensions

Discarded-X400-IPMS-Extensions.

§

DiscardedX400MtsExtensions

Discarded-X400-MTS-Extensions.

§

DiscloseRecipients

Disclose-Recipients.

§

DispositionNotificationOptions

Disposition-Notification-Options.

§

DispositionNotificationTo

Disposition-Notification-To.

§

DowngradedFinalRecipient

Downgraded-Final-Recipient.

§

DowngradedInReplyTo

Downgraded-In-Reply-To.

§

DowngradedMessageId

Downgraded-Message-Id.

§

DowngradedOriginalRecipient

Downgraded-Original-Recipient.

§

DowngradedReferences

Downgraded-References.

§

Encoding

Encoding.

§

Expires

Expires.

§

GenerateDeliveryReport

Generate-Delivery-Report.

§

HpOuter

HP-Outer.

§

Importance

Importance.

§

IncompleteCopy

Incomplete-Copy.

§

Language

Language.

§

LatestDeliveryTime

Latest-Delivery-Time.

§

ListUnsubscribePost

List-Unsubscribe-Post.

§

MessageContext

Message-Context.

§

MessageType

Message-Type.

§

MmhsExemptedAddress

MMHS-Exempted-Address.

§

MmhsExtendedAuthorisationInfo

MMHS-Extended-Authorisation-Info.

§

MmhsSubjectIndicatorCodes

MMHS-Subject-Indicator-Codes.

§

MmhsHandlingInstructions

MMHS-Handling-Instructions.

§

MmhsMessageInstructions

MMHS-Message-Instructions.

§

MmhsCodressMessageIndicator

MMHS-Codress-Message-Indicator.

§

MmhsOriginatorReference

MMHS-Originator-Reference.

§

MmhsPrimaryPrecedence

MMHS-Primary-Precedence.

§

MmhsCopyPrecedence

MMHS-Copy-Precedence.

§

MmhsMessageType

MMHS-Message-Type.

§

MmhsOtherRecipientsIndicatorTo

MMHS-Other-Recipients-Indicator-To.

§

MmhsOtherRecipientsIndicatorCc

MMHS-Other-Recipients-Indicator-CC.

§

MmhsAcp127MessageIdentifier

MMHS-Acp127-Message-Identifier.

§

MmhsOriginatorPlad

MMHS-Originator-PLAD.

§

MtPriority

MT-Priority.

§

Organization

Organization.

§

OriginalEncodedInformationTypes

Original-Encoded-Information-Types.

§

OriginalFrom

Original-From.

§

OriginalMessageId

Original-Message-ID.

§

OriginalRecipient

Original-Recipient.

§

OriginatorReturnAddress

Originator-Return-Address.

§

OriginalSubject

Original-Subject.

§

PicsLabel

PICS-Label.

§

PreventNonDeliveryReport

Prevent-NonDelivery-Report.

§

Priority

Priority.

§

ReceivedSpf

Received-SPF.

§

ReplyBy

Reply-By.

§

RequireRecipientValidSince

Require-Recipient-Valid-Since.

§

Sensitivity

Sensitivity.

§

Solicitation

Solicitation.

§

Supersedes

Supersedes.

§

TlsReportDomain

TLS-Report-Domain.

§

TlsReportSubmitter

TLS-Report-Submitter.

§

TlsRequired

TLS-Required.

§

VbrInfo

VBR-Info.

§

X400ContentIdentifier

X400-Content-Identifier.

§

X400ContentReturn

X400-Content-Return.

§

X400ContentType

X400-Content-Type.

§

X400MtsIdentifier

X400-MTS-Identifier.

§

X400Originator

X400-Originator.

§

X400Received

X400-Received.

§

X400Recipients

X400-Recipients.

§

X400Trace

X400-Trace.

§

ApparentlyTo

Apparently-To.

§

Author

Author.

§

CfblAddress

CFBL-Address.

§

CfblFeedbackId

CFBL-Feedback-ID.

§

DeliveredTo

Delivered-To.

§

EdiintFeatures

EDIINT-Features.

§

EesstVersion

Eesst-Version.

§

ErrorsTo

Errors-To.

§

Face

Face.

§

FormSub

Form-Sub.

§

JabberId

Jabber-ID.

§

MmhsAuthorizingUsers

MMHS-Authorizing-Users.

§

Privicon

Privicon.

§

SioLabel

SIO-Label.

§

SioLabelHistory

SIO-Label-History.

§

WrongRecipient

Wrong-Recipient.

§

XOriginalTo

X-Original-To.

§

ReturnReceiptTo

Return-Receipt-To.

§

XSpamStatus

X-Spam-Status.

§

XSpamScore

X-Spam-Score.

§

XSpamFlag

X-Spam-Flag.

§

XSpamResult

X-Spam-Result.

§

XPriority

X-Priority.

§

XMSMailPriority

X-MSMail-Priority.

§

XMailer

X-Mailer.

§

UserAgent

User-Agent.

§

XMimeOLE

X-MimeOLE.

§

XOriginatingIp

X-Originating-IP.

§

XForwardedTo

X-Forwarded-To.

§

XForwardedFor

X-Forwarded-For.

§

XAutoResponseSuppress

X-Auto-Response-Suppress.

§

Precedence

Precedence.

§

ThreadIndex

Thread-Index.

§

ThreadTopic

Thread-Topic.

§

FeedbackId

Feedback-ID.

§

XUniversallyUniqueIdentifier

X-Universally-Unique-Identifier.

§

XVirusScanned

X-Virus-Scanned.

§

XMailFrom

X-MailFrom.

§

XMailmanVersion

X-Mailman-Version.

§

MessageIdHash

Message-ID-Hash.

§

XMessageIdHash

X-Message-ID-Hash.

§

XMailmanRuleMisses

X-Mailman-Rule-Misses.

§

XSpamLevel

X-Spam-Level.

§

XReceived

X-Received.

§

XGmMessageState

X-Gm-Message-State.

§

XGoogleDkimSignature

X-Google-DKIM-Signature.

§

XMailboxLine

X-Mailbox-Line.

§

XGmGg

X-Gm-Gg.

§

XOriginalFrom

X-Original-From.

§

XGoogleSmtpSource

X-Google-Smtp-Source.

§

XMsTnefCorrelator

X-MS-TNEF-Correlator.

§

XMsHasAttach

X-MS-Has-Attach.

§

XMeProxy

X-ME-Proxy.

§

XMeProxyCause

X-ME-Proxy-Cause.

§

XMeSender

X-ME-Sender.

§

XGmFeatures

X-Gm-Features.

§

XMsExchangeTransportCrossTenantHeadersStamped

X-MS-Exchange-Transport-CrossTenantHeadersStamped.

§

XMsPublicTrafficType

X-MS-PublicTrafficType.

§

XOriginatorOrg

X-OriginatorOrg.

§

XMsExchangeCrossTenantNetworkMessageId

X-MS-Exchange-CrossTenant-Network-Message-Id.

§

XMsExchangeCrossTenantAuthSource

X-MS-Exchange-CrossTenant-AuthSource.

§

XMsExchangeCrossTenantAuthAs

X-MS-Exchange-CrossTenant-AuthAs.

§

XMsExchangeCrossTenantOriginalArrivalTime

X-MS-Exchange-CrossTenant-OriginalArrivalTime.

§

XMicrosoftAntispam

X-Microsoft-Antispam.

§

XMsExchangeCrossTenantId

X-MS-Exchange-CrossTenant-Id.

§

XMsTrafficTypeDiagnostic

X-MS-TrafficTypeDiagnostic.

§

XMicrosoftAntispamMessageInfo

X-Microsoft-Antispam-Message-Info.

§

XMsOffice365FilteringCorrelationId

X-MS-Office365-Filtering-Correlation-Id.

§

XMsExchangeCrossTenantFromEntityHeader

X-MS-Exchange-CrossTenant-FromEntityHeader.

§

XMsExchangeAntiSpamMessageDataChunkCount

X-MS-Exchange-AntiSpam-MessageData-ChunkCount.

§

XMsExchangeAntiSpamMessageData0

X-MS-Exchange-AntiSpam-MessageData-0.

§

XMsExchangeSenderADCheck

X-MS-Exchange-SenderADCheck.

§

XForefrontAntispamReport

X-Forefront-Antispam-Report.

§

XMsExchangeAntiSpamRelay

X-MS-Exchange-AntiSpam-Relay.

§

XMsExchangeCrossTenantMailboxType

X-MS-Exchange-CrossTenant-MailboxType.

§

XMsExchangeCrossTenantUserPrincipalName

X-MS-Exchange-CrossTenant-UserPrincipalName.

§

XGitHubReason

X-GitHub-Reason.

§

XGitHubRecipientAddress

X-GitHub-Recipient-Address.

§

XGitHubRecipient

X-GitHub-Recipient.

§

Destinations

Destinations.

§

XGitHubSender

X-GitHub-Sender.

§

XGitHubNotifyPlatform

X-GitHub-Notify-Platform.

§

XThreadId

X-ThreadId.

§

XSesOutgoing

X-SES-Outgoing.

§

XProofpointVirusVersion

X-Proofpoint-Virus-Version.

§

XGitHubAssignees

X-GitHub-Assignees.

§

XGitHubLabels

X-GitHub-Labels.

§

BimiSelector

BIMI-Selector.

§

XStripeEid

X-Stripe-EID.

§

XAttachmentId

X-Attachment-Id.

§

XTestIDTracker

X-Test-IDTracker.

§

XIetfIDTracker

X-IETF-IDTracker.

§

XPmMessageId

X-Pm-Message-ID.

§

XAntiAbuse

X-AntiAbuse.

§

Autocrypt

Autocrypt.

§

XComplaintsTo

X-Complaints-To.

§

XProofpointOrigGuid

X-Proofpoint-ORIG-GUID.

§

XProofpointGuid

X-Proofpoint-GUID.

§

XGitHubIssueState

X-GitHub-IssueState.

§

XMsReactions

X-MS-Reactions.

§

XPmMtaPool

X-Pm-MTA-Pool.

§

XPmRcpt

X-Pm-RCPT.

§

XProofpointSpamDetailsEnc

X-Proofpoint-Spam-Details-Enc.

§

XPmMessageOptions

X-Pm-Message-Options.

§

XSenderId

X-Sender-ID.

§

XGitHubPullRequestStatus

X-GitHub-PullRequestStatus.

§

XAuthorityAnalysis

X-Authority-Analysis.

§

XForwardedEncrypted

X-Forwarded-Encrypted.

§

XMsExchangeAntiSpamExternalHopMessageDataChunkCount

X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount.

§

XMsExchangeAntiSpamExternalHopMessageData0

X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0.

§

XMsExchangeCrossTenantRmsPersistedConsumerOrg

X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg.

§

XExchangeRoutingPolicyChecked

X-Exchange-RoutingPolicyChecked.

§

XMsExchangeCrossTenantOriginalAttributedTenantConnectingIp

X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp.

§

XMsExchangeMessageSentRepresentingType

X-MS-Exchange-MessageSentRepresentingType.

§

XMsExchangeTransportCrossTenantHeadersStripped

X-MS-Exchange-Transport-CrossTenantHeadersStripped.

§

XMsOffice365FilteringCorrelationIdPrvs

X-MS-Office365-Filtering-Correlation-Id-Prvs.

§

XMicrosoftAntispamMessageInfoOriginal

X-Microsoft-Antispam-Message-Info-Original.

§

XMsExchangeAuthenticationResults

X-MS-Exchange-Authentication-Results.

§

XForefrontAntispamReportUntrusted

X-Forefront-Antispam-Report-Untrusted.

§

XMsExchangeAtpMessageProperties

X-MS-Exchange-AtpMessageProperties.

§

XMicrosoftAntispamUntrusted

X-Microsoft-Antispam-Untrusted.

§

XMsExchangeAntiSpamMessageData1

X-MS-Exchange-AntiSpam-MessageData-1.

§

XMissiveId

X-Missive-Id.

§

XIadbIpReverse

X-IADB-IP-Reverse.

§

XReportAbuse

X-Report-Abuse.

§

DkimFilter

DKIM-Filter.

§

XMeReceived

X-ME-Received.

§

XProofpointSpamDetails

X-Proofpoint-Spam-Details.

§

Other(Cow<'x, str>)

Any other name, with its original spelling.

Implementations§

Source§

impl<'x> HeaderName<'x>

Source

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

Parses a header name. Returns None for an empty name or one with a byte that RFC 5322 does not allow in a field name (anything but printable US-ASCII other than the colon). Never allocates.

Source

pub fn key(&self) -> HeaderKey<'_>

Resolves the name once, for code that looks the same name up in many parts or messages: crate::Headers::all_key and crate::Headers::get_key then skip the name lookup that crate::Headers::all and crate::Headers::get do on every call.

use mail_parser::{HeaderName, MessageParser};

let message = MessageParser::new()
    .parse(b"X-Tag: a\r\nX-Tag: b\r\n\r\nbody")
    .expect("message");
let name = HeaderName::from("x-tag");
let key = name.key();
assert_eq!(message.headers().all_key(key).count(), 2);
assert_eq!(
    message.headers().get_key(key).map(|header| header.raw_value()),
    Some(&b" b\r\n"[..])
);
Source

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

Converts the name into one that owns its spelling.

Source

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

Canonical spelling of a known name; empty for other names.

Source

pub fn as_str(&self) -> &str

Canonical spelling of a known name, or the original spelling of any other name.

Source

pub fn is_other(&self) -> bool

Whether this is not one of the known names.

Source

pub fn is_mime_header(&self) -> bool

Whether this is one of the seven Content-* MIME header fields.

Source

pub fn is_content_header(&self) -> bool

Whether this is any Content-* header field, known or not: the fields that describe a part’s content and do not survive replacing it.

Source

pub fn is_structured(&self) -> bool

Whether the default parser yields a structured value for this name.

Trait Implementations§

Source§

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

Source§

fn clone(&self) -> Self

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<&HeaderName<'x>> for HeaderName<'x>

Source§

fn from(value: &HeaderName<'x>) -> 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(name: HeaderName<'_>) -> Self

Converts to this type from the input type.
Source§

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

Source§

fn from(name: 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 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 Ord for HeaderName<'_>

Source§

fn cmp(&self, other: &Self) -> 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§

fn clamp_to<R>(self, range: R) -> Self
where Self: Sized, R: ClampBounds<Self>,

🔬This is a nightly-only experimental API. (clamp_to)
Restrict a value to a certain range. 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 PartialOrd for HeaderName<'_>

Source§

fn partial_cmp(&self, other: &Self) -> 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 = !

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

fn try_from(value: U) -> Result<T, !>

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.