#[non_exhaustive]pub enum CcacheError {
UnsupportedVersion {
found: u16,
expected: u16,
},
Truncated {
need: usize,
at: usize,
remaining: usize,
},
TooManyComponents {
count: u32,
at: usize,
cap: u32,
},
Utf8 {
at: usize,
source: Utf8Error,
},
}Expand description
Every fatal shape/length problem this crate produces. Marked #[non_exhaustive] so new
diagnostics land as patch bumps rather than breaking downstream match blocks.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
UnsupportedVersion
The file header did not start with a supported version tag.
Fields
Truncated
A length field would run past the end of the buffer — the file is truncated or the declared count is hostile.
Fields
TooManyComponents
A component count on a principal exceeded the sane cap. MIT’s own krb5.h limits
this in practice; hostile input tries to force a giant Vec::with_capacity.
Fields
Utf8
The variable-length field decoded as valid UTF-16 or ASCII but not as UTF-8 — MIT ccache stores principal component names as bytes without an encoding tag, so a non-UTF-8 realm typically means a corrupt file (or a file from a locale we don’t yet handle).
Trait Implementations§
Source§impl Debug for CcacheError
impl Debug for CcacheError
Source§impl Display for CcacheError
impl Display for CcacheError
impl Eq for CcacheError
Source§impl Error for CcacheError
impl Error for CcacheError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()