pub struct ContentPreference(/* private fields */);Implementations§
Source§impl ContentPreference
impl ContentPreference
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 ContentPreference
impl AsRef<str> for ContentPreference
Source§impl Clone for ContentPreference
impl Clone for ContentPreference
Source§fn clone(&self) -> ContentPreference
fn clone(&self) -> ContentPreference
Returns a duplicate 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 ContentPreference
impl Debug for ContentPreference
Source§impl Display for ContentPreference
impl Display for ContentPreference
Source§impl FromStr for ContentPreference
impl FromStr for ContentPreference
Source§impl Hash for ContentPreference
impl Hash for ContentPreference
Source§impl Ord for ContentPreference
impl Ord for ContentPreference
Source§fn cmp(&self, other: &ContentPreference) -> Ordering
fn cmp(&self, other: &ContentPreference) -> Ordering
1.21.0 · 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 ContentPreference
impl PartialEq for ContentPreference
Source§impl PartialOrd for ContentPreference
impl PartialOrd for ContentPreference
Source§impl TryFrom<&str> for ContentPreference
impl TryFrom<&str> for ContentPreference
impl Eq for ContentPreference
impl StructuralPartialEq for ContentPreference
Auto Trait Implementations§
impl Freeze for ContentPreference
impl RefUnwindSafe for ContentPreference
impl Send for ContentPreference
impl Sync for ContentPreference
impl Unpin for ContentPreference
impl UnsafeUnpin for ContentPreference
impl UnwindSafe for ContentPreference
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