/// Load and validate events from the given YAML string.
Load and validate events from the given YAML string.
Load and validate events from the given YAML string .
fn load_str(s: &str) -> Result<Self, Report> {
        let events = serde_yaml::from_str::<Events>(s)?;
        for event in &events.events {
            let problems = event.validate();
            if !problems.is_empty() {
                bail!("Problems with event '{}': {:?}", event.name, problems);
            }
        }
        Ok(events)
    }
fn load_str ( s : & str ) -> Result < Self , Report > { let events = serde_yaml :: from_str :: < Events > ( s ) ? ; for event in & events . events { let problems = event . validate ( ) ; if ! problems . is_empty ( ) { bail ! ( " " event name problems ) ; } } Ok ( events ) }
Load and validate events from the given YAML string.
Load and validate events from the given YAML string .
s
&str