pub struct ParseIdentifierError { /* private fields */ }
Expand description
Error type returned from the FromStr
implementation on IdentifierType
.
§Examples
const ERR: ParseIdentifierError = ParseIdentifierError::new();
assert_eq!("not a valid ident".parse::<IdentifierType>(), Err(ERR));
Implementations§
Source§impl ParseIdentifierError
impl ParseIdentifierError
Sourcepub const fn new() -> Self
pub const fn new() -> Self
Construct a new ParseIdentifierError
.
Prefer to use new()
over default()
since new()
is const.
§Examples
const ERR: ParseIdentifierError = ParseIdentifierError::new();
assert_eq!("not a valid ident".parse::<IdentifierType>(), Err(ERR));
assert_eq!(ERR, ParseIdentifierError::default());
Trait Implementations§
Source§impl Clone for ParseIdentifierError
impl Clone for ParseIdentifierError
Source§fn clone(&self) -> ParseIdentifierError
fn clone(&self) -> ParseIdentifierError
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 ParseIdentifierError
impl Debug for ParseIdentifierError
Source§impl Default for ParseIdentifierError
impl Default for ParseIdentifierError
Source§fn default() -> ParseIdentifierError
fn default() -> ParseIdentifierError
Returns the “default value” for a type. Read more
Source§impl Display for ParseIdentifierError
impl Display for ParseIdentifierError
Source§impl Hash for ParseIdentifierError
impl Hash for ParseIdentifierError
Source§impl Ord for ParseIdentifierError
impl Ord for ParseIdentifierError
Source§fn cmp(&self, other: &ParseIdentifierError) -> Ordering
fn cmp(&self, other: &ParseIdentifierError) -> 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 ParseIdentifierError
impl PartialEq for ParseIdentifierError
Source§impl PartialOrd for ParseIdentifierError
impl PartialOrd for ParseIdentifierError
impl Copy for ParseIdentifierError
impl Eq for ParseIdentifierError
impl StructuralPartialEq for ParseIdentifierError
Auto Trait Implementations§
impl Freeze for ParseIdentifierError
impl RefUnwindSafe for ParseIdentifierError
impl Send for ParseIdentifierError
impl Sync for ParseIdentifierError
impl Unpin for ParseIdentifierError
impl UnwindSafe for ParseIdentifierError
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