[−][src]Struct httpbis::Header
HTTP/2 header, regular or pseudo-header
Fields
value: HeaderValue
Header value.
Implementations
impl Header
[src]
pub fn new_validate(name: Bytes, value: Bytes) -> HeaderResult<Header>
[src]
Create a new Header
object with exact values of name
and value
.
This function performs header validation, in particular, header name must be lower case.
pub fn new<N: Into<HeaderName>, V: Into<HeaderValue>>(
name: N,
value: V
) -> Header
[src]
name: N,
value: V
) -> Header
Creates a new Header
with the given name and value.
The name and value need to be convertible into a HeaderPart
.
Header name is converted to lower case. This function panics if header name is not valid.
pub fn name(&self) -> &str
[src]
Return a borrowed representation of the Header
name.
pub fn value(&self) -> &[u8]
[src]
Return a borrowed representation of the Header
value.
pub fn format(&self) -> String
[src]
name: value
pub fn is_preudo_header(&self) -> bool
[src]
Header is pseudo header?
pub fn pseudo_header_name(&self) -> Option<PseudoHeaderName>
[src]
Pseudo header name.
pub fn validate(&self, req_or_resp: RequestOrResponse) -> HeaderResult<()>
[src]
Validate header as request or response header.
Trait Implementations
impl Clone for Header
[src]
impl Debug for Header
[src]
impl Eq for Header
[src]
impl<N: Into<HeaderName>, V: Into<HeaderValue>> From<(N, V)> for Header
[src]
impl FromIterator<Header> for Headers
[src]
fn from_iter<T: IntoIterator<Item = Header>>(iter: T) -> Headers
[src]
impl Hash for Header
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<Header> for Header
[src]
impl StructuralEq for Header
[src]
impl StructuralPartialEq for Header
[src]
Auto Trait Implementations
impl RefUnwindSafe for Header
impl Send for Header
impl Sync for Header
impl Unpin for Header
impl UnwindSafe for Header
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,