Creates a Result from an element and its priority.
const Result({required this.element, required this.priority});