cm_fidl_validator

Function validate

Source
pub fn validate(decl: &Component) -> Result<(), ErrorList>
Expand description

Validates a Component.

The Component may ultimately originate from a CM file, or be directly constructed by the caller. Either way, a Component should always be validated before it’s used. Examples of what is validated (which may evolve in the future):

  • That all semantically required fields are present
  • That a child_name referenced in a source actually exists in the list of children
  • That there are no duplicate target paths.
  • That only weak-dependency capabilities may be offered back to the component that exposed them.

All checks are local to this Component.