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