pub struct CustomHeaderName(/* private fields */);Implementations§
Source§impl CustomHeaderName
impl CustomHeaderName
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 CustomHeaderName
impl AsRef<str> for CustomHeaderName
Source§impl Clone for CustomHeaderName
impl Clone for CustomHeaderName
Source§fn clone(&self) -> CustomHeaderName
fn clone(&self) -> CustomHeaderName
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 CustomHeaderName
impl Debug for CustomHeaderName
Source§impl Display for CustomHeaderName
impl Display for CustomHeaderName
Source§impl FromStr for CustomHeaderName
impl FromStr for CustomHeaderName
Source§impl Hash for CustomHeaderName
impl Hash for CustomHeaderName
Source§impl Ord for CustomHeaderName
impl Ord for CustomHeaderName
Source§fn cmp(&self, other: &CustomHeaderName) -> Ordering
fn cmp(&self, other: &CustomHeaderName) -> 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 CustomHeaderName
impl PartialEq for CustomHeaderName
Source§fn eq(&self, other: &CustomHeaderName) -> bool
fn eq(&self, other: &CustomHeaderName) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for CustomHeaderName
impl PartialOrd for CustomHeaderName
Source§impl TryFrom<&str> for CustomHeaderName
impl TryFrom<&str> for CustomHeaderName
impl Eq for CustomHeaderName
impl StructuralPartialEq for CustomHeaderName
Auto Trait Implementations§
impl Freeze for CustomHeaderName
impl RefUnwindSafe for CustomHeaderName
impl Send for CustomHeaderName
impl Sync for CustomHeaderName
impl Unpin for CustomHeaderName
impl UnsafeUnpin for CustomHeaderName
impl UnwindSafe for CustomHeaderName
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