pub trait ReprRule: Send + Sync {
type Assignment: ReprAssignment;
type DeclLevel: ReprDeclLevel<Assignment = Self::Assignment>;
type DomainLevel: ReprDomainLevel<DeclLevel = Self::DeclLevel>;
const NAME: &'static str;
const SHORT_NAME: &'static str;
const STORED: &'static dyn ReprRuleStored;
// Provided methods
fn id() -> ReprId { ... }
fn applies_to(_family: SolverFamily) -> bool { ... }
fn compactness_score(dom: Moo<Domain>) -> Result<usize, ReprInitError> { ... }
fn get_or_init_for(
decl: &mut DeclarationPtr,
) -> Result<(MappedRwLockReadGuard<'_, RawRwLock, Self::DeclLevel>, SymbolTable, Vec<Expression>), ReprError> { ... }
fn get_for(
decl: &DeclarationPtr,
) -> Option<MappedRwLockReadGuard<'_, RawRwLock, Self::DeclLevel>> { ... }
fn init_for(
decl: &mut DeclarationPtr,
) -> Result<(SymbolTable, Vec<Expression>), ReprError> { ... }
fn init_for_if_not_exists(
decl: &mut DeclarationPtr,
) -> Result<(SymbolTable, Vec<Expression>), ReprError> { ... }
}Required Associated Constants§
const NAME: &'static str
const SHORT_NAME: &'static str
const STORED: &'static dyn ReprRuleStored
Required Associated Types§
type Assignment: ReprAssignment
type DeclLevel: ReprDeclLevel<Assignment = Self::Assignment>
type DomainLevel: ReprDomainLevel<DeclLevel = Self::DeclLevel>
Provided Methods§
Sourcefn applies_to(_family: SolverFamily) -> bool
fn applies_to(_family: SolverFamily) -> bool
Whether this representation is available when targeting family.
Solver-specific representations – the SAT integer encodings, say, or the SMT integer theories – are only candidates for their own backend. Representations of Essence’s abstract types are solver-independent and keep the default.
fn compactness_score(dom: Moo<Domain>) -> Result<usize, ReprInitError>
fn get_or_init_for( decl: &mut DeclarationPtr, ) -> Result<(MappedRwLockReadGuard<'_, RawRwLock, Self::DeclLevel>, SymbolTable, Vec<Expression>), ReprError>
fn get_for( decl: &DeclarationPtr, ) -> Option<MappedRwLockReadGuard<'_, RawRwLock, Self::DeclLevel>>
fn init_for( decl: &mut DeclarationPtr, ) -> Result<(SymbolTable, Vec<Expression>), ReprError>
fn init_for_if_not_exists( decl: &mut DeclarationPtr, ) -> Result<(SymbolTable, Vec<Expression>), ReprError>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".