You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
498 B

//! Caching errors
use super::*;
use std::io;
use std::{
fmt,
error,
};
/// A partial cache entry initialisation error
#[derive(Debug)]
pub struct PartialInitError(pub(super) io::Error);
impl error::Error for PartialInitError
{
fn source(&self) -> Option<&(dyn error::Error + 'static)> {
Some(&self.0)
}
}
impl fmt::Display for PartialInitError
{
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result
{
write!(f, "Failed to initialise a partial cache entry")
}
}