Struct rtsp_types::headers::HeaderName
source · pub struct HeaderName(/* private fields */);
Expand description
Representation of an RTSP header name.
This ensures that the header name only contains ASCII characters and comparisons on it are case-insensitive as required by the RTSP RFC.
RTSP headers are not normalized to a specific case but stored in here as created.
Implementations§
source§impl HeaderName
impl HeaderName
sourcepub fn from_static_str(v: &'static str) -> Result<HeaderName, AsciiError>
pub fn from_static_str(v: &'static str) -> Result<HeaderName, AsciiError>
Convert a static &str
to a header name.
This does not involve any heap allocations.
Trait Implementations§
source§impl Clone for HeaderName
impl Clone for HeaderName
source§fn clone(&self) -> HeaderName
fn clone(&self) -> HeaderName
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for HeaderName
impl Debug for HeaderName
source§impl Display for HeaderName
impl Display for HeaderName
source§impl Hash for HeaderName
impl Hash for HeaderName
Case-insensitive hashing of header names.
source§impl Ord for HeaderName
impl Ord for HeaderName
Case-insensitive ordering of header names.
source§impl PartialEq<HeaderName> for &HeaderName
impl PartialEq<HeaderName> for &HeaderName
source§fn eq(&self, other: &HeaderName) -> bool
fn eq(&self, other: &HeaderName) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq<String> for HeaderName
impl PartialEq<String> for HeaderName
source§impl PartialEq<str> for HeaderName
impl PartialEq<str> for HeaderName
source§impl PartialEq for HeaderName
impl PartialEq for HeaderName
Case-insensitive comparison of header names.
source§impl PartialOrd<HeaderName> for &HeaderName
impl PartialOrd<HeaderName> for &HeaderName
source§fn partial_cmp(&self, other: &HeaderName) -> Option<Ordering>
fn partial_cmp(&self, other: &HeaderName) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl PartialOrd for HeaderName
impl PartialOrd for HeaderName
Case-insensitive ordering of header names.
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl<'a> TryFrom<&'a [u8]> for HeaderName
impl<'a> TryFrom<&'a [u8]> for HeaderName
Create a header name from a &[u8]
.
§type Error = AsciiError
type Error = AsciiError
The type returned in the event of a conversion error.
source§fn try_from(v: &'a [u8]) -> Result<HeaderName, AsciiError>
fn try_from(v: &'a [u8]) -> Result<HeaderName, AsciiError>
Performs the conversion.
source§impl<'a> TryFrom<&'a str> for HeaderName
impl<'a> TryFrom<&'a str> for HeaderName
Create a header name from a &str
.
§type Error = AsciiError
type Error = AsciiError
The type returned in the event of a conversion error.
source§fn try_from(v: &'a str) -> Result<HeaderName, AsciiError>
fn try_from(v: &'a str) -> Result<HeaderName, AsciiError>
Performs the conversion.
source§impl TryFrom<String> for HeaderName
impl TryFrom<String> for HeaderName
Create a header name from a String
.
This takes ownership of the passed in String
and does not involve an additional heap
allocation.
§type Error = AsciiError
type Error = AsciiError
The type returned in the event of a conversion error.
source§fn try_from(v: String) -> Result<HeaderName, AsciiError>
fn try_from(v: String) -> Result<HeaderName, AsciiError>
Performs the conversion.
impl Eq for HeaderName
Auto Trait Implementations§
impl Freeze for HeaderName
impl RefUnwindSafe for HeaderName
impl Send for HeaderName
impl Sync for HeaderName
impl Unpin for HeaderName
impl UnwindSafe for HeaderName
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more