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