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