#[non_exhaustive]pub enum OkfError {
Empty(String),
NoConcepts {
path: String,
files: usize,
detail: String,
},
AllBlocked {
path: String,
blocked: usize,
},
}Expand description
Errors raised while reading a bundle.
#[non_exhaustive], on SkipReason’s reasoning and for the same subject:
these name ways a directory somebody else produced fails to be a bundle,
and that set is open by construction — OKF is a vendor-neutral format, so the
producers are not ours to enumerate. A caller wants the message, not an
exhaustive match; adding a way to fail should not be a breaking change.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Empty(String)
The directory holds no markdown at all.
NoConcepts
Markdown was found, and none of it was a concept.
Deliberately fatal where a single bad document is only skipped: one unreadable file in a readable bundle is the case §11 asks consumers to tolerate, but a directory in which nothing parsed is not a bundle read badly — it is not a bundle, and importing zero concepts while exiting zero would report success for having done nothing.
Fields
AllBlocked
Every concept that parsed was refused by the screen.
Fatal on OkfError::NoConcepts’s reasoning, and for a sharper reason:
a directory whose every document carries concealed instructions to a
language model is not a bundle with a problem in it. Importing nothing
while exiting zero would report success for having refused everything.
Trait Implementations§
Source§impl Error for OkfError
impl Error for OkfError
1.30.0 · 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()