pub fn get_predicate_by_path(
scope: &dyn Scope,
path: &[String],
) -> Result<Rc<Predicate>, RiddleError>Expand description
Resolves a predicate by path.
All segments except the last are resolved as a type path via
get_type_by_path. The last segment is then looked up as a predicate
within the resolved class type.
ยงErrors
Returns:
RiddleError::RuntimeErrorifpathis empty.- Any error returned by
get_type_by_pathfor the prefix path. RiddleError::NotAClassif the resolved type path is not a class.RiddleError::NotFoundif the final predicate cannot be resolved.