pub fn validate_child(child: &fsys::ChildDecl) -> Result<(), ErrorList> {
    let mut errors = vec![];
    check_name(child.name.as_ref(), "ChildDecl", "name", &mut errors);
    check_url(child.url.as_ref(), "ChildDecl", "url", &mut errors);
    if child.startup.is_none() {
        errors.push(Error::missing_field("ChildDecl", "startup"));
    }
    if child.environment.is_some() {
        check_name(child.environment.as_ref(), "ChildDecl", "environment", &mut errors);
    }
    if errors.is_empty() {
        Ok(())
    } else {
        Err(ErrorList { errs: errors })
    }
}
/// Validates an independent ChildDecl. Performs the same validation on it as `validate`.
Validates an independent ChildDecl. Performs the same validation on it as `validate`.
Validates an independent ChildDecl . Performs the same validation on it as ` validate ` .
pub fn validate_child(child: &fsys::ChildDecl) -> Result<(), ErrorList> {
    let mut errors = vec![];
    check_name(child.name.as_ref(), "ChildDecl", "name", &mut errors);
    check_url(child.url.as_ref(), "ChildDecl", "url", &mut errors);
    if child.startup.is_none() {
        errors.push(Error::missing_field("ChildDecl", "startup"));
    }
    if child.environment.is_some() {
        check_name(child.environment.as_ref(), "ChildDecl", "environment", &mut errors);
    }
    if errors.is_empty() {
        Ok(())
    } else {
        Err(ErrorList { errs: errors })
    }
}
pub fn validate_child ( child : & fsys :: ChildDecl ) -> Result < ( ) , ErrorList > { let mut errors = vec ! [ ] ; check_name ( child . name . as_ref ( ) , " " , " " , & mut errors ) ; check_url ( child . url . as_ref ( ) , " " , " " , & mut errors ) ; if child . startup . is_none ( ) { errors . push ( Error :: missing_field ( " " , " " ) ) ; } if child . environment . is_some ( ) { check_name ( child . environment . as_ref ( ) , " " , " " , & mut errors ) ; } if errors . is_empty ( ) { Ok ( ( ) ) } else { Err ( ErrorList { errs : errors } ) } }
Validates an independent ChildDecl.
Validates an independent ChildDecl .
child
&fsys::ChildDecl
child
&fsys::ChildDecl