pub struct CourseMetadata {
pub schema_version: Option<u64>,
pub course: Option<CourseInfo>,
pub chapters: Vec<ChapterMetadata>,
pub classifications: Vec<CurriculumClassification>,
pub tags: Vec<String>,
pub repertoire: Option<RepertoireSettings>,
pub lichess: Option<LichessMetadata>,
pub extensions: BTreeMap<String, Value>,
}Expand description
The metadata envelope shared by all supported course kinds.
A missing schema version identifies the deliberately supported legacy
format used by the Python converter. Version 1 manifests receive full
validation through CourseMetadata::from_json.
Fields§
§schema_version: Option<u64>§course: Option<CourseInfo>§chapters: Vec<ChapterMetadata>§classifications: Vec<CurriculumClassification>§repertoire: Option<RepertoireSettings>§lichess: Option<LichessMetadata>§extensions: BTreeMap<String, Value>Implementations§
Source§impl CourseMetadata
impl CourseMetadata
Sourcepub fn from_json(json: &str) -> Result<Self, MetadataError>
pub fn from_json(json: &str) -> Result<Self, MetadataError>
Parses metadata and applies version-specific semantic validation.
Sourcepub const fn is_legacy(&self) -> bool
pub const fn is_legacy(&self) -> bool
Returns whether this is an unversioned Python-compatible manifest.
Sourcepub fn repertoire_side(&self) -> Option<RepertoireSide>
pub fn repertoire_side(&self) -> Option<RepertoireSide>
Returns the course-wide repertoire side when one is configured.
Trait Implementations§
Source§impl Clone for CourseMetadata
impl Clone for CourseMetadata
Source§impl Debug for CourseMetadata
impl Debug for CourseMetadata
Source§impl<'de> Deserialize<'de> for CourseMetadata
impl<'de> Deserialize<'de> for CourseMetadata
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
Source§impl PartialEq for CourseMetadata
impl PartialEq for CourseMetadata
Source§impl Serialize for CourseMetadata
impl Serialize for CourseMetadata
impl StructuralPartialEq for CourseMetadata
Auto Trait Implementations§
impl Freeze for CourseMetadata
impl RefUnwindSafe for CourseMetadata
impl Send for CourseMetadata
impl Sync for CourseMetadata
impl Unpin for CourseMetadata
impl UnsafeUnpin for CourseMetadata
impl UnwindSafe for CourseMetadata
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