#[non_exhaustive]pub struct CourseInfo {
pub name: String,
pub constraint: Vec<String>,
pub trophy: Vec<Trophy>,
pub charts: Vec<ChartItem>,
pub md5: Vec<String>,
pub sha256: Vec<String>,
pub extra: BTreeMap<String, Value>,
}Expand description
Course information.
Describes a course’s name, constraints, trophies and chart set.
Charts are specified via three independent fields that can coexist:
charts (full objects), md5 (hash shorthand), and sha256 (hash shorthand).
All three are preserved for round-trip fidelity.
Use CourseInfo::all_charts for a merged view.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringCourse name, e.g. “Satellite Skill Analyzer 2nd sl0”
constraint: Vec<String>Constraint list, e.g. ["grade_mirror", "gauge_lr2", "ln"]
trophy: Vec<Trophy>List of trophies, defining requirements for different ranks
charts: Vec<ChartItem>Full chart objects from the charts JSON array
md5: Vec<String>MD5 hash shorthand list, expanded by all_charts with level = "0"
sha256: Vec<String>SHA256 hash shorthand list, expanded by all_charts with level = "0"
extra: BTreeMap<String, Value>Extra data (unrecognized fields from course JSON)
Implementations§
Source§impl CourseInfo
impl CourseInfo
Sourcepub const fn new(name: String) -> Self
pub const fn new(name: String) -> Self
Creates a new CourseInfo with the given name and all other fields empty.
Sourcepub fn all_charts(&self) -> Vec<ChartItem>
pub fn all_charts(&self) -> Vec<ChartItem>
Merges all chart sources in order: charts → md5 → sha256.
Hash shorthand entries (md5, sha256) are expanded into ChartItems
with level defaulting to "0" per the BMS difficulty table spec.
Trait Implementations§
Source§impl Clone for CourseInfo
impl Clone for CourseInfo
Source§fn clone(&self) -> CourseInfo
fn clone(&self) -> CourseInfo
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CourseInfo
impl Debug for CourseInfo
Source§impl<'de> Deserialize<'de> for CourseInfo
impl<'de> Deserialize<'de> for CourseInfo
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>,
Source§impl From<CourseInfo> for CourseGroup
impl From<CourseInfo> for CourseGroup
Source§fn from(info: CourseInfo) -> Self
fn from(info: CourseInfo) -> Self
Source§impl PartialEq for CourseInfo
impl PartialEq for CourseInfo
Source§fn eq(&self, other: &CourseInfo) -> bool
fn eq(&self, other: &CourseInfo) -> bool
self and other values to be equal, and is used by ==.