sofie-model 0.1.0

The app model: modules, areas and routes, read from source without compiling it.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use crate::{App, KnownArea};

impl App {
    #[must_use]
    pub fn has_feature_flags(&self) -> bool {
        self.modules
            .iter()
            .any(|module| !module.code.features.declarations.is_empty())
    }

    #[must_use]
    pub fn has_permitted_areas(&self) -> bool {
        self.areas().iter().any(KnownArea::is_permitted)
    }
}