pub struct DisjunctionResult {
pub solutions: Vec<Bindings>,
pub successful_branches: Vec<usize>,
pub success: bool,
}Expand description
Result of evaluating a disjunction
Fields§
§solutions: Vec<Bindings>All solutions from all branches
successful_branches: Vec<usize>Which branches succeeded (by index)
success: boolWhether the disjunction as a whole succeeded
Implementations§
Source§impl DisjunctionResult
impl DisjunctionResult
Sourcepub fn success(
solutions: Vec<Bindings>,
successful_branches: Vec<usize>,
) -> Self
pub fn success( solutions: Vec<Bindings>, successful_branches: Vec<usize>, ) -> Self
Create a successful result
Sourcepub fn add_branch_solutions(
&mut self,
branch_index: usize,
solutions: Vec<Bindings>,
)
pub fn add_branch_solutions( &mut self, branch_index: usize, solutions: Vec<Bindings>, )
Add solutions from a branch
Sourcepub fn deduplicate(&mut self)
pub fn deduplicate(&mut self)
Deduplicate solutions based on variable bindings
Sourcepub fn solution_count(&self) -> usize
pub fn solution_count(&self) -> usize
Get the total number of solutions
Trait Implementations§
Source§impl Clone for DisjunctionResult
impl Clone for DisjunctionResult
Source§fn clone(&self) -> DisjunctionResult
fn clone(&self) -> DisjunctionResult
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DisjunctionResult
impl Debug for DisjunctionResult
Auto Trait Implementations§
impl Freeze for DisjunctionResult
impl RefUnwindSafe for DisjunctionResult
impl Send for DisjunctionResult
impl Sync for DisjunctionResult
impl Unpin for DisjunctionResult
impl UnwindSafe for DisjunctionResult
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