pub struct NoSuchCaseFoldingScheme { /* private fields */ }
Expand description
Error type for returned when a folding scheme could not be resolved in a
TryFrom
implementation.
When this crate’s std
feature is enabled, NoSuchCaseFoldingScheme
implements std::error::Error
.
§Examples
assert_eq!(CaseFold::try_from(None::<&str>), Ok(CaseFold::Full));
assert_eq!(CaseFold::try_from(Some("ascii")), Ok(CaseFold::Ascii));
assert_eq!(CaseFold::try_from(Some("turkic")), Ok(CaseFold::Turkic));
assert_eq!(CaseFold::try_from(Some("lithuanian")), Ok(CaseFold::Lithuanian));
assert_eq!(CaseFold::try_from(Some("xxx")), Err(NoSuchCaseFoldingScheme::new()));
Implementations§
Source§impl NoSuchCaseFoldingScheme
impl NoSuchCaseFoldingScheme
Sourcepub const fn new() -> Self
pub const fn new() -> Self
Construct a new NoSuchCaseFoldingScheme
error.
§Examples
const ERR: NoSuchCaseFoldingScheme = NoSuchCaseFoldingScheme::new();
Trait Implementations§
Source§impl Clone for NoSuchCaseFoldingScheme
impl Clone for NoSuchCaseFoldingScheme
Source§fn clone(&self) -> NoSuchCaseFoldingScheme
fn clone(&self) -> NoSuchCaseFoldingScheme
Returns a copy 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 NoSuchCaseFoldingScheme
impl Debug for NoSuchCaseFoldingScheme
Source§impl Default for NoSuchCaseFoldingScheme
impl Default for NoSuchCaseFoldingScheme
Source§fn default() -> NoSuchCaseFoldingScheme
fn default() -> NoSuchCaseFoldingScheme
Returns the “default value” for a type. Read more
Source§impl Display for NoSuchCaseFoldingScheme
impl Display for NoSuchCaseFoldingScheme
Source§impl Error for NoSuchCaseFoldingScheme
impl Error for NoSuchCaseFoldingScheme
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl Hash for NoSuchCaseFoldingScheme
impl Hash for NoSuchCaseFoldingScheme
Source§impl Ord for NoSuchCaseFoldingScheme
impl Ord for NoSuchCaseFoldingScheme
Source§fn cmp(&self, other: &NoSuchCaseFoldingScheme) -> Ordering
fn cmp(&self, other: &NoSuchCaseFoldingScheme) -> 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 NoSuchCaseFoldingScheme
impl PartialEq for NoSuchCaseFoldingScheme
Source§impl PartialOrd for NoSuchCaseFoldingScheme
impl PartialOrd for NoSuchCaseFoldingScheme
impl Copy for NoSuchCaseFoldingScheme
impl Eq for NoSuchCaseFoldingScheme
impl StructuralPartialEq for NoSuchCaseFoldingScheme
Auto Trait Implementations§
impl Freeze for NoSuchCaseFoldingScheme
impl RefUnwindSafe for NoSuchCaseFoldingScheme
impl Send for NoSuchCaseFoldingScheme
impl Sync for NoSuchCaseFoldingScheme
impl Unpin for NoSuchCaseFoldingScheme
impl UnwindSafe for NoSuchCaseFoldingScheme
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