Skip to main content

ReprRule

Trait ReprRule 

Source
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§

Source

const NAME: &'static str

Source

const SHORT_NAME: &'static str

Source

const STORED: &'static dyn ReprRuleStored

Required Associated Types§

Provided Methods§

Source

fn id() -> ReprId

This representation’s identity.

Source

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.

Source

fn compactness_score(dom: Moo<Domain>) -> Result<usize, ReprInitError>

Source

fn get_or_init_for( decl: &mut DeclarationPtr, ) -> Result<(MappedRwLockReadGuard<'_, RawRwLock, Self::DeclLevel>, SymbolTable, Vec<Expression>), ReprError>

Source

fn get_for( decl: &DeclarationPtr, ) -> Option<MappedRwLockReadGuard<'_, RawRwLock, Self::DeclLevel>>

Source

fn init_for( decl: &mut DeclarationPtr, ) -> Result<(SymbolTable, Vec<Expression>), ReprError>

Source

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".

Implementors§