fleshing out the core a bit more

This commit is contained in:
Chris Cochrun 2024-10-06 05:51:39 -05:00
parent e05815e550
commit c8bb484a53
13 changed files with 497 additions and 9 deletions

View file

@ -0,0 +1,38 @@
#[derive(Debug, Clone, Default, PartialEq, Eq)]
pub enum PresKind {
Html,
#[default]
Pdf,
Generic,
}
#[derive(Debug, Clone, Default, PartialEq, Eq)]
pub struct Presentation {
title: String,
kind: PresKind,
}
impl Presentation {
pub fn new() -> Self {
Self {
title: "".to_string(),
..Default::default()
}
}
pub fn get_kind(&self) -> &PresKind {
&self.kind
}
}
#[cfg(test)]
mod test {
use crate::presentations::{PresKind, Presentation};
#[test]
pub fn test_presentation() {
let pres = Presentation::new();
assert_eq!(pres.get_kind(), &PresKind::Pdf)
}
}