pub struct ApiHeaderName(/* private fields */);Implementations§
Source§impl ApiHeaderName
impl ApiHeaderName
Sourcepub fn new(value: impl AsRef<str>) -> Result<Self, ApiPrimitiveError>
pub fn new(value: impl AsRef<str>) -> Result<Self, ApiPrimitiveError>
Creates validated text metadata.
§Errors
Returns ApiPrimitiveError when the value is empty or contains control characters.
Sourcepub fn into_string(self) -> String
pub fn into_string(self) -> String
Consumes the value and returns the stored text.
Trait Implementations§
Source§impl AsRef<str> for ApiHeaderName
impl AsRef<str> for ApiHeaderName
Source§impl Clone for ApiHeaderName
impl Clone for ApiHeaderName
Source§fn clone(&self) -> ApiHeaderName
fn clone(&self) -> ApiHeaderName
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ApiHeaderName
impl Debug for ApiHeaderName
Source§impl Display for ApiHeaderName
impl Display for ApiHeaderName
Source§impl FromStr for ApiHeaderName
impl FromStr for ApiHeaderName
Source§impl Hash for ApiHeaderName
impl Hash for ApiHeaderName
Source§impl Ord for ApiHeaderName
impl Ord for ApiHeaderName
Source§fn cmp(&self, other: &ApiHeaderName) -> Ordering
fn cmp(&self, other: &ApiHeaderName) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ApiHeaderName
impl PartialEq for ApiHeaderName
Source§fn eq(&self, other: &ApiHeaderName) -> bool
fn eq(&self, other: &ApiHeaderName) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for ApiHeaderName
impl PartialOrd for ApiHeaderName
Source§impl TryFrom<&str> for ApiHeaderName
impl TryFrom<&str> for ApiHeaderName
impl Eq for ApiHeaderName
impl StructuralPartialEq for ApiHeaderName
Auto Trait Implementations§
impl Freeze for ApiHeaderName
impl RefUnwindSafe for ApiHeaderName
impl Send for ApiHeaderName
impl Sync for ApiHeaderName
impl Unpin for ApiHeaderName
impl UnsafeUnpin for ApiHeaderName
impl UnwindSafe for ApiHeaderName
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