pub trait TaskAccessor {
// Required methods
fn context_path(&self) -> Option<&str>;
fn item_context_path(&self) -> Option<&str>;
fn id(&self) -> &str;
fn task_type(&self) -> &EvaluationTaskType;
fn operator(&self) -> &ComparisonOperator;
fn expected_value(&self) -> &Value;
fn depends_on(&self) -> &[String];
fn add_result(&mut self, result: AssertionResult);
}Required Methods§
Sourcefn context_path(&self) -> Option<&str>
fn context_path(&self) -> Option<&str>
Returns optional context path - avoids &Option<String> pattern
Sourcefn item_context_path(&self) -> Option<&str>
fn item_context_path(&self) -> Option<&str>
When context_path resolves to an array of objects, this path is applied to
each element to extract the value before the operator is evaluated.
fn task_type(&self) -> &EvaluationTaskType
Sourcefn operator(&self) -> &ComparisonOperator
fn operator(&self) -> &ComparisonOperator
Returns reference to comparison operator
Sourcefn expected_value(&self) -> &Value
fn expected_value(&self) -> &Value
Returns reference to expected value
Sourcefn depends_on(&self) -> &[String]
fn depends_on(&self) -> &[String]
Returns slice of dependency IDs - more efficient than &Vec<String>