pub struct ParseLangError(/* private fields */);Expand description
Error returned by LANG’s
FromStr impl when the input is not a
recognised language name.
Holds the offending input verbatim so wrapper layers can format
their own user-facing message; mirrors
ParseMetricError.
Implementations§
Source§impl ParseLangError
impl ParseLangError
Sourcepub fn input(&self) -> &str
pub fn input(&self) -> &str
The rejected input that failed to parse as a language name.
Lets callers recover the offending string programmatically
rather than scraping it out of the Display
output. Mirrors
ParseMetricError::input.
Trait Implementations§
Source§impl Clone for ParseLangError
impl Clone for ParseLangError
Source§fn clone(&self) -> ParseLangError
fn clone(&self) -> ParseLangError
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 ParseLangError
impl Debug for ParseLangError
Source§impl Display for ParseLangError
impl Display for ParseLangError
impl Eq for ParseLangError
Source§impl Error for ParseLangError
impl Error for ParseLangError
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 PartialEq for ParseLangError
impl PartialEq for ParseLangError
Source§fn eq(&self, other: &ParseLangError) -> bool
fn eq(&self, other: &ParseLangError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ParseLangError
Auto Trait Implementations§
impl Freeze for ParseLangError
impl RefUnwindSafe for ParseLangError
impl Send for ParseLangError
impl Sync for ParseLangError
impl Unpin for ParseLangError
impl UnsafeUnpin for ParseLangError
impl UnwindSafe for ParseLangError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.