pub trait PracticeWorld {
// Required methods
fn locate(&self, lesson_path: &str) -> Option<PathBuf>;
fn cwd_relative(&self) -> String;
// Provided methods
fn kind_at(&self, lesson_path: &str) -> Option<EntryKind> { ... }
fn read_text(&self, lesson_path: &str) -> Option<String> { ... }
}Expand description
The practice environment a lesson runs in, as seen by outcome checks
Required Methods§
Sourcefn locate(&self, lesson_path: &str) -> Option<PathBuf>
fn locate(&self, lesson_path: &str) -> Option<PathBuf>
Real path for a path relative to the lesson home, if it stays inside
Sourcefn cwd_relative(&self) -> String
fn cwd_relative(&self) -> String
Current directory relative to the lesson home (“” at the home)
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".