pub struct Catalog {
pub activities: Vec<Activity>,
pub data_hash: u64,
}Expand description
The activity catalog.
Fields§
§activities: Vec<Activity>§data_hash: u64Hash of the source files; part of the content context.
Implementations§
Source§impl Catalog
impl Catalog
Sourcepub fn builtin() -> Self
pub fn builtin() -> Self
Parses and validates the embedded activity files. Panics on invalid data, which CI catches through the tests.
Sourcepub fn from_sources(sources: &[(&str, &str)]) -> Result<Self, Vec<String>>
pub fn from_sources(sources: &[(&str, &str)]) -> Result<Self, Vec<String>>
Parses (file name, toml) pairs. Returns every error at once.
pub fn get(&self, id: &str) -> Option<&Activity>
Trait Implementations§
impl StructuralPartialEq for Catalog
Auto Trait Implementations§
impl Forget for Catalog
impl Freeze for Catalog
impl Move for Catalog
impl RefUnwindSafe for Catalog
impl Send for Catalog
impl Sync for Catalog
impl Unpin for Catalog
impl UnsafeUnpin for Catalog
impl UnwindSafe for Catalog
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more