Enum GenError Copy item path Source pub enum GenError {
InvalidLessonId {
lesson_id: String ,
},
EmptySuite,
NoRepoRoot {
course_root: PathBuf ,
},
Write {
path: PathBuf ,
source: Error ,
},
}Expand description Why an eval dir could not be generated.
The lesson id is not a safe slug: empty, or containing a character
outside ASCII alphanumerics, -, _. Mirrors scaffold::is_valid_slug
(scaffold.rs:320), enforced here so a hostile id can never reach a path
or an emitted template (§1.3.1).
Fields The rejected id, quoted back to the caller.
The suite has no cases. A vacuous “100% pass” is a sneaky pass, so an
empty suite is refused rather than emitting tasks/ with zero files.
No ancestor of the course root contains scripts/smevals/, so the
script-path prefix cannot be computed exactly (and the old four-hop
guess is exactly the wrong-depth bug this refusal replaces). The
effectful shell refuses rather than emit a path that resolves
somewhere else (§1.1).
Fields The canonicalized course root that was walked up from.
Writing a generated file failed (the effectful shell only — the pure
generator never touches the filesystem).
Fields The path that could not be written.
The underlying I/O failure.
Formats the value using the given formatter.
Read more Formats the value using the given formatter.
Read more Returns the lower-level source of this error, if any.
Read more 👎 Deprecated since 1.42.0: use the Display impl or to_string()
👎 Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
🔬 This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports.
Read more Immutably borrows from an owned value.
Read more Mutably borrows from an owned value.
Read more Returns the argument unchanged.
Instruments this type with the provided [
Span], returning an
Instrumented wrapper.
Read more Instruments this type with the provided
Span, returning an
Instrumented wrapper.
Read more Instruments this type with the
current Span, returning an
Instrumented wrapper.
Read more Calls U::from(self).
That is, this conversion is whatever the implementation of
From <T> for U chooses to do.
Create a new
Policy that returns [
Action::Follow] only if
self and
other return
Action::Follow.
Read more Create a new
Policy that returns [
Action::Follow] if either
self or
other returns
Action::Follow.
Read more Converts the given value to a
String.
Read more The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.