pub struct Shape {
pub branches: Vec<ShapeBranch>,
pub free_variables: Vec<FactReference>,
}Expand description
A shape representing the solution space for an inversion query
Contains one or more branches, each representing a solution. Each branch specifies conditions and the corresponding outcome.
Fields§
§branches: Vec<ShapeBranch>Solution branches - each branch is a valid solution
free_variables: Vec<FactReference>Variables that are not fully constrained (free to vary)
Implementations§
Source§impl Shape
impl Shape
Sourcepub fn new(
branches: Vec<ShapeBranch>,
free_variables: Vec<FactReference>,
) -> Self
pub fn new( branches: Vec<ShapeBranch>, free_variables: Vec<FactReference>, ) -> Self
Create a new shape
Sourcepub fn is_fully_constrained(&self) -> bool
pub fn is_fully_constrained(&self) -> bool
Check if this shape has any free variables
Trait Implementations§
impl StructuralPartialEq for Shape
Auto Trait Implementations§
impl Freeze for Shape
impl RefUnwindSafe for Shape
impl Send for Shape
impl Sync for Shape
impl Unpin for Shape
impl UnwindSafe for Shape
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