pub struct Lesson {
pub id: String,
pub title: String,
pub description: String,
pub difficulty: Difficulty,
pub estimated_minutes: u32,
pub steps: Vec<LessonStep>,
pub prerequisites: Vec<String>,
pub tags: Vec<String>,
pub setup: Vec<SetupFile>,
}Expand description
A complete lesson module (e.g., “Navigation Basics”)
§TOML lesson-pack format
Lessons can be authored as *.toml files (loaded from
~/.config/arct/lessons/ via LessonLibrary::load_from_dir). The
top-level fields map 1:1 onto this struct:
id = "my-lesson"
title = "My Lesson"
description = "What this lesson teaches."
difficulty = "Beginner" # Beginner | Intermediate | Advanced | Expert
estimated_minutes = 10
prerequisites = ["nav-basics"] # lesson ids to complete first
tags = ["beginner", "files"]
# Optional starter files, materialized into the practice environment
# before the lesson starts (omit entirely if the lesson needs none).
# In simulated mode they are seeded into the virtual sandbox filesystem;
# in real practice mode they are written under
# ~/ArcAcademy/playground/<lesson-id>/ and the session cd's there.
# `path` is relative to the lesson's practice directory (subdirectories
# are created as needed; absolute paths and `..` are rejected).
[[setup]]
path = "notes.txt"
contents = "starter content\n"
[[setup]]
path = "logs/server.log"
contents = "line 1\nline 2\n"
[[steps]]
step_number = 1
title = "First step"
instruction = "Type the command..."
hint = "Try 'pwd'"
[steps.step_type.CommandExercise]
expected_command = "pwd"
validation = "CommandOnly"
success_message = "Nice!"Fields§
§id: String§title: String§description: String§difficulty: Difficulty§estimated_minutes: u32§steps: Vec<LessonStep>§prerequisites: Vec<String>§setup: Vec<SetupFile>Optional starter files for the lesson’s practice environment.
Defaults to empty, so existing lesson-pack TOML files without a
setup array keep parsing unchanged.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Lesson
impl<'de> Deserialize<'de> for Lesson
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Lesson
impl RefUnwindSafe for Lesson
impl Send for Lesson
impl Sync for Lesson
impl Unpin for Lesson
impl UnsafeUnpin for Lesson
impl UnwindSafe for Lesson
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more