pub struct Response {
pub doc_name: String,
pub results: Vec<RuleResult>,
pub warnings: Vec<String>,
}Expand description
Response from evaluating a Lemma document
Contains the results of evaluating all rules in a document, including their computed values and any variable bindings.
Fields§
§doc_name: String§results: Vec<RuleResult>§warnings: Vec<String>Implementations§
Source§impl Response
impl Response
pub fn new(doc_name: String) -> Self
pub fn add_result(&mut self, result: RuleResult)
pub fn add_warning(&mut self, warning: String)
Sourcepub fn filter_rules(&mut self, rule_names: &[String])
pub fn filter_rules(&mut self, rule_names: &[String])
Filter results to only include specified rules
Keeps only the rules whose names are in the provided list.
This is used when evaluating specific rules (e.g., doc:rule1,rule2)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Response
impl RefUnwindSafe for Response
impl Send for Response
impl Sync for Response
impl Unpin for Response
impl UnwindSafe for Response
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more