ml_model_card_basic_usage/basic_usage.rs
1use use_ml_model_card::{MlModelCard, MlModelCardName, MlModelCardSection};
2
3fn main() -> Result<(), use_ml_model_card::MlModelCardError> {
4 let card = MlModelCard::new(MlModelCardName::new("baseline-card")?)
5 .with_section(MlModelCardSection::Overview);
6
7 assert_eq!(card.name().as_str(), "baseline-card");
8 assert_eq!(card.sections(), &[MlModelCardSection::Overview]);
9 Ok(())
10}