Struct Header

Source
pub struct Header {
    pub name: String,
    pub value: String,
}

Fields§

§name: String§value: String

Implementations§

Source§

impl Header

Source

pub const _ACCESS_CONTROL_REQUEST_METHOD: &'static str = "Access-Control-Request-Method"

Source

pub const _ACCESS_CONTROL_REQUEST_HEADERS: &'static str = "Access-Control-Request-Headers"

Source

pub const _ACCESS_CONTROL_ALLOW_ORIGIN: &'static str = "Access-Control-Allow-Origin"

Source

pub const _ACCESS_CONTROL_ALLOW_METHODS: &'static str = "Access-Control-Allow-Methods"

Source

pub const _ACCESS_CONTROL_ALLOW_HEADERS: &'static str = "Access-Control-Allow-Headers"

Source

pub const _ACCESS_CONTROL_ALLOW_CREDENTIALS: &'static str = "Access-Control-Allow-Credentials"

Source

pub const _ACCESS_CONTROL_MAX_AGE: &'static str = "Access-Control-Max-Age"

Source

pub const _ACCESS_CONTROL_EXPOSE_HEADERS: &'static str = "Access-Control-Expose-Headers"

Source

pub const _ACCEPT: &'static str = "Accept"

Source

pub const _ACCEPT_RANGES: &'static str = "Accept-Ranges"

Source

pub const _ACCEPT_CH: &'static str = "Accept-CH"

Source

pub const _ACCEPT_ENCODING: &'static str = "Accept-Encoding"

Source

pub const _ACCEPT_LANGUAGE: &'static str = "Accept-Language"

Source

pub const _ACCEPT_PATCH: &'static str = "Accept-Patch"

Source

pub const _ACCEPT_POST: &'static str = "Accept-Post"

Source

pub const _AGE: &'static str = "Age"

Source

pub const _ALLOW: &'static str = "Allow"

Source

pub const _ALT_SVC: &'static str = "Alt-Svc"

Source

pub const _AUTHORIZATION: &'static str = "Authorization"

Source

pub const _CACHE_CONTROL: &'static str = "Cache-Control"

Source

pub const _CLEAR_SITE_DATA: &'static str = "Clear-Site-Data"

Source

pub const _CONTENT_TYPE: &'static str = "Content-Type"

Source

pub const _CONTENT_LENGTH: &'static str = "Content-Length"

Source

pub const _CONTENT_RANGE: &'static str = "Content-Range"

Source

pub const _CONTENT_DISPOSITION: &'static str = "Content-Disposition"

Source

pub const _CONTENT_ENCODING: &'static str = "Content-Encoding"

Source

pub const _CONTENT_LANGUAGE: &'static str = "Content-Language"

Source

pub const _CONTENT_LOCATION: &'static str = "Content-Location"

Source

pub const _CONTENT_SECURITY_POLICY: &'static str = "Content-Security-Policy"

Source

pub const _CONTENT_SECURITY_POLICY_REPORT_ONLY: &'static str = "Content-Security-Policy-Report-Only"

Source

pub const _CROSS_ORIGIN_EMBEDDER_POLICY: &'static str = "Cross-Origin-Embedder-Policy"

Source

pub const _CROSS_ORIGIN_OPENER_POLICY: &'static str = "Cross-Origin-Opener-Policy"

Source

pub const _CROSS_ORIGIN_RESOURCE_POLICY: &'static str = "Cross-Origin-Resource-Policy"

Source

pub const _DATE: &'static str = "Date"

Source

pub const _DATE_UNIX_EPOCH_NANOS: &'static str = "Date-Unix-Epoch-Nanos"

Source

pub const _DEVICE_MEMORY: &'static str = "Device-Memory"

Source

pub const _DIGEST: &'static str = "Digest"

Source

pub const _EARLY_DATA: &'static str = "Early-Data"

Source

pub const _ECT: &'static str = "ECT"

Source

pub const _ETAG: &'static str = "ETag"

Source

pub const _EXPECT: &'static str = "Expect"

Source

pub const _EXPIRES: &'static str = "Expires"

Source

pub const _FEATURE_POLICY: &'static str = "Feature-Policy"

Source

pub const _PERMISSIONS_POLICY: &'static str = "Permissions-Policy"

Source

pub const _FORWARDED: &'static str = "Forwarded"

Source

pub const _FROM: &'static str = "From"

Source

pub const _HOST: &'static str = "Host"

Source

pub const _IF_MATCH: &'static str = "If-Match"

Source

pub const _IF_MODIFIED_SINCE: &'static str = "If-Modified-Since"

Source

pub const _IF_NONE_MATCH: &'static str = "If-None-Match"

Source

pub const _IF_RANGE: &'static str = "If-Range"

Source

pub const _IF_UNMODIFIED_SINCE: &'static str = "If-Unmodified-Since"

Source

pub const _LAST_MODIFIED: &'static str = "Last-Modified"

Source

pub const _LAST_MODIFIED_UNIX_EPOCH_NANOS: &'static str = "Last-Modified-Unix-Epoch-Nanos"

Source

pub const _LOCATION: &'static str = "Location"

Source

pub const _MAX_FORWARDS: &'static str = "Max-Forwards"

Source

pub const _NEL: &'static str = "NEL"

Source

pub const _ORIGIN: &'static str = "Origin"

Source

pub const _PROXY_AUTHENTICATE: &'static str = "Proxy-Authenticate"

Source

pub const _PROXY_AUTHORIZATION: &'static str = "Proxy-Authorization"

Source

pub const _RANGE: &'static str = "Range"

Source

pub const _REFERER: &'static str = "Referer"

Source

pub const _REFERRER_POLICY: &'static str = "Referrer-Policy"

Source

pub const _RETRY_AFTER: &'static str = "Retry-After"

Source

pub const _RTT: &'static str = "RTT"

Source

pub const _SAVE_DATA: &'static str = "Save-Data"

Source

pub const _SEC_CH_UA: &'static str = "Sec-CH-UA"

Source

pub const _SEC_CH_UA_ARCH: &'static str = "Sec-CH-UA-Arch"

Source

pub const _SEC_CH_UA_BITNESS: &'static str = "Sec-CH-UA-Bitness"

Source

pub const _SEC_CH_UA_FULL_VERSION_LIST: &'static str = "Sec-CH-UA-Full-Version-List"

Source

pub const _SEC_CH_UA_MOBILE: &'static str = "Sec-CH-UA-Mobile"

Source

pub const _SEC_CH_UA_MODEL: &'static str = "Sec-CH-UA-Model"

Source

pub const _SEC_CH_UA_PLATFORM: &'static str = "Sec-CH-UA-Platform"

Source

pub const _SEC_CH_UA_PLATFORM_VERSION: &'static str = "Sec-CH-UA-Platform-Version"

Source

pub const _SEC_FETCH_DEST: &'static str = "Sec-Fetch-Dest"

Source

pub const _SEC_FETCH_MODE: &'static str = "Sec-Fetch-Mode"

Source

pub const _SEC_FETCH_SITE: &'static str = "Sec-Fetch-Site"

Source

pub const _SEC_FETCH_USER: &'static str = "Sec-Fetch-User"

Source

pub const _SEC_GPC: &'static str = "Sec-GPC"

Source

pub const _SERVER: &'static str = "Server"

Source

pub const _SERVER_TIMING: &'static str = "Server-Timing"

Source

pub const _SERVICE_WORKER_NAVIGATION_PRELOAD: &'static str = "Service-Worker-Navigation-Preload"

Source

pub const _SOURCE_MAP: &'static str = "SourceMap"

Source

pub const _STRICT_TRANSPORT_SECURITY: &'static str = "Strict-Transport-Security"

Source

pub const _TE: &'static str = "TE"

Source

pub const _TIMING_ALLOW_ORIGIN: &'static str = "Timing-Allow-Origin"

Source

pub const _TRAILER: &'static str = "Trailer"

Source

pub const _TRANSFER_ENCODING: &'static str = "Transfer-Encoding"

Source

pub const _UPGRADE: &'static str = "Upgrade"

Source

pub const _UPGRADE_INSECURE_REQUESTS: &'static str = "Upgrade-Insecure-Requests"

Source

pub const _USER_AGENT: &'static str = "User-Agent"

Source

pub const _VARY: &'static str = "Vary"

Source

pub const _VIA: &'static str = "Via"

Source

pub const _WANT_DIGEST: &'static str = "Want-Digest"

Source

pub const _WWW_AUTHENTICATE: &'static str = "WWW-Authenticate"

Source

pub const _X_CONTENT_TYPE_OPTIONS: &'static str = "X-Content-Type-Options"

Source

pub const _X_CONTENT_TYPE_OPTIONS_VALUE_NOSNIFF: &'static str = "nosniff"

Source

pub const _X_FRAME_OPTIONS: &'static str = "X-Frame-Options"

Source

pub const _X_FRAME_OPTIONS_VALUE_DENY: &'static str = "DENY"

Source

pub const _X_FRAME_OPTIONS_VALUE_SAME_ORIGIN: &'static str = "SAMEORIGIN"

Source

pub const NAME_VALUE_SEPARATOR: &'static str = ": "

Source

pub const _DO_NOT_STORE_CACHE: &'static str = "no-store, no-cache, private, max-age=0, must-revalidate, proxy-revalidate"

Source

pub fn as_string(&self) -> String

Source

pub fn get_header_list(request: &Request) -> Vec<Header>

Source

pub fn get_x_content_type_options_header() -> Header

Source

pub fn get_accept_ranges_header() -> Header

Source

pub fn get_x_frame_options_header() -> Header

Source

pub fn get_date_iso_8601_header() -> Header

Source

pub fn get_no_cache_header() -> Header

Source

pub fn parse_header(raw_header: &str) -> Result<Header, String>

Source

pub fn parse(raw_header: &str) -> Result<Header, String>

Source

pub fn generate(&self) -> String

Trait Implementations§

Source§

impl Clone for Header

Source§

fn clone(&self) -> Header

Returns a copy of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for Header

Source§

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

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

impl PartialEq for Header

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for Header

Source§

impl StructuralPartialEq for Header

Auto Trait Implementations§

§

impl Freeze for Header

§

impl RefUnwindSafe for Header

§

impl Send for Header

§

impl Sync for Header

§

impl Unpin for Header

§

impl UnwindSafe for Header

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