pub enum Error {
Length(usize),
InvalidDate(String),
NotNumber(char),
}Expand description
Represents the different types of errors that can occur when validating a Chinese ID. 指定在解析时可能遇到的错误
Variants§
Length(usize)
The length of the ID is incorrect. 长度不匹配时的错误
InvalidDate(String)
The date of birth in the ID is invalid. 无效的出生日期
NotNumber(char)
A character in the ID is not a valid number. 出乎意料的内容
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
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