pub trait Validate {
// Required methods
fn is_complete(
&self,
top: &Module,
cache: &ModuleCache
) -> Result<bool, Error>;
fn is_valid(
&self,
check_constraints: bool,
top: &Module,
cache: &ModuleCache
) -> Result<bool, Error>;
// Provided method
fn validate(
&self,
check_constraints: bool,
top: &Module,
cache: &ModuleCache,
errors: &mut Vec<Error>
) -> Result<(), Error> { ... }
}