open_timeline_core/
reduced.rs1mod entities;
8mod entity;
9mod timeline;
10mod timelines;
11
12pub use entities::*;
13pub use entity::*;
14pub use timeline::*;
15pub use timelines::*;
16
17use crate::{Name, OpenTimelineId};
18use std::collections::BTreeSet;
19
20pub trait IsReducedType {
24 fn from_id_and_name(id: OpenTimelineId, name: Name) -> Self;
26
27 fn name(&self) -> &Name;
29
30 fn id(&self) -> OpenTimelineId;
32}
33
34pub trait IsReducedCollection:
41 FromIterator<<Self as IsReducedCollection>::Item> + IntoIterator
42{
43 type Item: IsReducedType + Ord + Clone;
44
45 fn collection(&self) -> &BTreeSet<<Self as IsReducedCollection>::Item>;
46 fn collection_mut(&mut self) -> &mut BTreeSet<<Self as IsReducedCollection>::Item>;
47}