pub struct Scope {
pub parts: Vec<String>,
pub only_among: bool,
}Expand description
Which solids a question is asked of: those of the parts placed parts
(left_leg, left_leg/shin), with the parts placed in them — all
solids, if it names none.
Fields§
§parts: Vec<String>§only_among: boolFor a question about pairs: only those with both solids in parts,
not each of them against everything.
Implementations§
Source§impl Scope
impl Scope
Sourcepub fn holds(&self, instance: &str) -> bool
pub fn holds(&self, instance: &str) -> bool
Whether it asks about the solid of the part placed at instance.
Sourcepub fn holds_pair(&self, a: &str, b: &str) -> bool
pub fn holds_pair(&self, a: &str, b: &str) -> bool
Whether it asks about the pair of solids of the parts placed at a
and b.
Sourcepub fn check(&self, solids: &[PlacedSolid<'_>]) -> GeopResult<()>
pub fn check(&self, solids: &[PlacedSolid<'_>]) -> GeopResult<()>
Refuses a part that none of solids is of, saying which there are:
a misspelt part would otherwise answer that nothing overlaps.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Scope
impl<'de> Deserialize<'de> for Scope
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Scope
Auto Trait Implementations§
impl Freeze for Scope
impl RefUnwindSafe for Scope
impl Send for Scope
impl Sync for Scope
impl Unpin for Scope
impl UnsafeUnpin for Scope
impl UnwindSafe for Scope
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