Alex Mikhalev
4 years ago
4 changed files with 29 additions and 1 deletions
@ -1,3 +1,5 @@ |
|||||||
|
mod program; |
||||||
mod section; |
mod section; |
||||||
|
|
||||||
pub use section::{Section, SectionRef}; |
pub use program::{Program, ProgramId, ProgramItem, ProgramRef, ProgramSequence, Programs}; |
||||||
|
pub use section::{Section, SectionId, SectionRef, Sections}; |
||||||
|
@ -0,0 +1,23 @@ |
|||||||
|
use std::{time::Duration, sync::Arc}; |
||||||
|
use super::section::SectionId; |
||||||
|
|
||||||
|
#[derive(Debug, Clone)] |
||||||
|
pub struct ProgramItem { |
||||||
|
pub section_id: SectionId, |
||||||
|
pub duration: Duration, |
||||||
|
} |
||||||
|
|
||||||
|
pub type ProgramSequence = Vec<ProgramItem>; |
||||||
|
|
||||||
|
pub type ProgramId = u32; |
||||||
|
|
||||||
|
#[derive(Debug, Clone)] |
||||||
|
pub struct Program { |
||||||
|
pub id: ProgramId, |
||||||
|
pub name: String, |
||||||
|
pub sequence: ProgramSequence, |
||||||
|
} |
||||||
|
|
||||||
|
pub type ProgramRef = Arc<Program>; |
||||||
|
|
||||||
|
pub type Programs = im::OrdMap<ProgramId, ProgramRef>; |
Loading…
Reference in new issue