pub struct ChainedVariableInfo {
pub anchor_type_id: TypeId,
pub entity_type_id: TypeId,
pub has_anchor_shadow: bool,
}Expand description
Information about a chained variable’s configuration.
Chained variables require knowledge of the anchor type to distinguish between anchor values (chain roots) and entity values (chain members).
Fields§
§anchor_type_id: TypeIdThe TypeId of the anchor type (problem fact at chain root).
entity_type_id: TypeIdThe TypeId of the entity type (chain members).
has_anchor_shadow: boolWhether this variable has an associated anchor shadow variable.
Implementations§
Source§impl ChainedVariableInfo
impl ChainedVariableInfo
Sourcepub fn with_anchor_shadow<Anchor: 'static, Entity: 'static>() -> Self
pub fn with_anchor_shadow<Anchor: 'static, Entity: 'static>() -> Self
Creates new chained variable info with anchor shadow variable.
Sourcepub fn is_anchor_type(&self, type_id: TypeId) -> bool
pub fn is_anchor_type(&self, type_id: TypeId) -> bool
Returns true if the given TypeId is the anchor type.
Sourcepub fn is_entity_type(&self, type_id: TypeId) -> bool
pub fn is_entity_type(&self, type_id: TypeId) -> bool
Returns true if the given TypeId is the entity type.
Trait Implementations§
Source§impl Clone for ChainedVariableInfo
impl Clone for ChainedVariableInfo
Source§fn clone(&self) -> ChainedVariableInfo
fn clone(&self) -> ChainedVariableInfo
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 ChainedVariableInfo
impl Debug for ChainedVariableInfo
Source§impl PartialEq for ChainedVariableInfo
impl PartialEq for ChainedVariableInfo
impl Eq for ChainedVariableInfo
impl StructuralPartialEq for ChainedVariableInfo
Auto Trait Implementations§
impl Freeze for ChainedVariableInfo
impl RefUnwindSafe for ChainedVariableInfo
impl Send for ChainedVariableInfo
impl Sync for ChainedVariableInfo
impl Unpin for ChainedVariableInfo
impl UnwindSafe for ChainedVariableInfo
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