pub struct Manifest {
pub lessons: Vec<ManifestEntry>,
pub site: Option<SiteConfig>,
}Expand description
A course manifest: the ordered list of lessons a course contains, parsed from
blendtutor.toml.
Fields§
§lessons: Vec<ManifestEntry>The lessons this course lists, in author order.
site: Option<SiteConfig>Site-level configuration from the optional [site] section. None when
the section is absent; the caller applies SiteConfig::default (max=20).
Implementations§
Source§impl Manifest
impl Manifest
Sourcepub fn parse(toml: &str) -> Result<Manifest, ManifestError>
pub fn parse(toml: &str) -> Result<Manifest, ManifestError>
Parse a manifest from a blendtutor.toml document.
The pure parse boundary (§2.1): the caller reads the file, this turns the
text into the typed model. A malformed document or a typo’d key yields
ManifestError::Parse; a lesson path that escapes the course directory
yields ManifestError::UnsafePath. Both are caught here, before any
lesson file is read (§1.3.1), so a parsed Manifest carries only relative,
non-.. paths. The check is lexical — it does not resolve symlinks, so a
symlink inside the course could still point elsewhere.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Manifest
impl<'de> Deserialize<'de> for Manifest
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>,
impl Eq for Manifest
impl StructuralPartialEq for Manifest
Auto Trait Implementations§
impl Freeze for Manifest
impl RefUnwindSafe for Manifest
impl Send for Manifest
impl Sync for Manifest
impl Unpin for Manifest
impl UnwindSafe for Manifest
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.