Struct lightws::handshake::HttpHeader
source · [−]Expand description
Http header, take two references
Fields
name: &'h [u8]value: &'h [u8]Implementations
sourceimpl<'h> HttpHeader<'h>
impl<'h> HttpHeader<'h>
sourcepub const fn new(name: &'h [u8], value: &'h [u8]) -> Self
pub const fn new(name: &'h [u8], value: &'h [u8]) -> Self
Constructor, take provided name and value.
sourcepub const fn new_storage() -> [HttpHeader<'static>; 32]
pub const fn new_storage() -> [HttpHeader<'static>; 32]
Create MAX_ALLOW_HEADERS empty headers.
sourcepub const fn new_custom_storage<const N: usize>() -> [HttpHeader<'static>; N]
pub const fn new_custom_storage<const N: usize>() -> [HttpHeader<'static>; N]
Create N empty headers.
Trait Implementations
sourceimpl<'h> Clone for HttpHeader<'h>
impl<'h> Clone for HttpHeader<'h>
sourcefn clone(&self) -> HttpHeader<'h>
fn clone(&self) -> HttpHeader<'h>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl<'h> Debug for HttpHeader<'h>
impl<'h> Debug for HttpHeader<'h>
sourceimpl Default for HttpHeader<'static>
impl Default for HttpHeader<'static>
sourceimpl<'h> Display for HttpHeader<'h>
impl<'h> Display for HttpHeader<'h>
sourceimpl<'h> PartialEq<HttpHeader<'h>> for HttpHeader<'h>
impl<'h> PartialEq<HttpHeader<'h>> for HttpHeader<'h>
sourcefn eq(&self, other: &HttpHeader<'h>) -> bool
fn eq(&self, other: &HttpHeader<'h>) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &HttpHeader<'h>) -> bool
fn ne(&self, other: &HttpHeader<'h>) -> bool
This method tests for !=.
impl<'h> Copy for HttpHeader<'h>
impl<'h> Eq for HttpHeader<'h>
impl<'h> StructuralEq for HttpHeader<'h>
impl<'h> StructuralPartialEq for HttpHeader<'h>
Auto Trait Implementations
impl<'h> RefUnwindSafe for HttpHeader<'h>
impl<'h> Send for HttpHeader<'h>
impl<'h> Sync for HttpHeader<'h>
impl<'h> Unpin for HttpHeader<'h>
impl<'h> UnwindSafe for HttpHeader<'h>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more