Struct wiremock::http::HeaderName [−][src]
pub struct HeaderName(_);
Expand description
A header name.
Implementations
Create a new HeaderName
from a Vec of ASCII bytes.
Error
This function will error if the bytes is not valid ASCII.
Create a new HeaderName
from an ASCII string.
Error
This function will error if the string is not valid ASCII.
Converts a vector of bytes to a HeaderName
without checking that the string contains
valid ASCII.
Safety
This function is unsafe because it does not check that the bytes passed to it are valid ASCII. If this constraint is violated, it may cause memory unsafety issues with future users of the HeaderName, as the rest of the library assumes that Strings are valid ASCII.
Trait Implementations
Performs the conversion.
Performs the conversion.
Create a new HeaderName
.
This checks it’s valid ASCII, and lowercases it.
Returns a reference to the value corresponding to the supplied name.
Panics
Panics if the name is not present in Headers
.
type Output = HeaderValues
type Output = HeaderValues
The returned type after indexing.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
pub fn try_from(
name: HeaderName
) -> Result<HeaderName, <HeaderName as TryFrom<HeaderName>>::Error>
pub fn try_from(
name: HeaderName
) -> Result<HeaderName, <HeaderName as TryFrom<HeaderName>>::Error>
Performs the conversion.
Auto Trait Implementations
impl RefUnwindSafe for HeaderName
impl Send for HeaderName
impl Sync for HeaderName
impl Unpin for HeaderName
impl UnwindSafe for HeaderName
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more