pub enum ParseFileError {
IoError(Error),
ParseLineError(ParseLineError),
InvalidHash {
calculated: Sha1Hash,
found: Sha1Hash,
},
MissingData(DataComponent),
DuplicateData {
data_component: DataComponent,
line1: usize,
line2: usize,
},
}Expand description
Indicates that a leap-seconds.list file could not be parsed successfully.
Variants§
IoError(Error)
An IO error occurred in the underlying stream.
ParseLineError(ParseLineError)
A line in the file could not be parsed successfully.
See ParseLineError for further information.
InvalidHash
The hash that was calculated did not match the one that was found in the file.
Fields
MissingData(DataComponent)
The given file is incomplete. Required data could not be found in the file.
DuplicateData
The file contains duplicate data.
Trait Implementations§
Source§impl Debug for ParseFileError
impl Debug for ParseFileError
Source§impl Display for ParseFileError
impl Display for ParseFileError
Source§impl Error for ParseFileError
impl Error for ParseFileError
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 From<Error> for ParseFileError
impl From<Error> for ParseFileError
Source§impl From<ParseLineError> for ParseFileError
impl From<ParseLineError> for ParseFileError
Source§fn from(source: ParseLineError) -> Self
fn from(source: ParseLineError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ParseFileError
impl !RefUnwindSafe for ParseFileError
impl Send for ParseFileError
impl Sync for ParseFileError
impl Unpin for ParseFileError
impl UnsafeUnpin for ParseFileError
impl !UnwindSafe for ParseFileError
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