pub trait ReprRuleStored: Send + Sync {
// Required methods
fn name(&self) -> &'static str;
fn short_name(&self) -> &'static str;
fn id(&self) -> ReprId;
fn applies_to(&self, family: SolverFamily) -> bool;
fn init_for(
&self,
decl: &mut DeclarationPtr,
) -> Result<(SymbolTable, Vec<Expression>), ReprError>;
fn init_for_if_not_exists(
&self,
decl: &mut DeclarationPtr,
) -> Result<(SymbolTable, Vec<Expression>), ReprError>;
fn probe_for(&self, decl: &DeclarationPtr) -> Result<usize, ReprError>;
fn get_or_init_for<'a>(
&self,
decl: &'a mut DeclarationPtr,
) -> Result<(MappedRwLockReadGuard<'a, RawRwLock, dyn ReprStateStored>, SymbolTable, Vec<Expression>), ReprError>;
fn get_for<'a>(
&self,
decl: &'a DeclarationPtr,
) -> Option<MappedRwLockReadGuard<'a, RawRwLock, dyn ReprStateStored>>;
fn deserialize_state(
&self,
val: Value,
) -> Result<Box<dyn ReprStateStored>, Error>;
}Required Methods§
fn name(&self) -> &'static str
fn short_name(&self) -> &'static str
Sourcefn applies_to(&self, family: SolverFamily) -> bool
fn applies_to(&self, family: SolverFamily) -> bool
Whether this representation is available when targeting family.
fn init_for( &self, decl: &mut DeclarationPtr, ) -> Result<(SymbolTable, Vec<Expression>), ReprError>
fn init_for_if_not_exists( &self, decl: &mut DeclarationPtr, ) -> Result<(SymbolTable, Vec<Expression>), ReprError>
Sourcefn probe_for(&self, decl: &DeclarationPtr) -> Result<usize, ReprError>
fn probe_for(&self, decl: &DeclarationPtr) -> Result<usize, ReprError>
Checks applicability without mutating the source declaration and returns its compactness score.
fn get_or_init_for<'a>( &self, decl: &'a mut DeclarationPtr, ) -> Result<(MappedRwLockReadGuard<'a, RawRwLock, dyn ReprStateStored>, SymbolTable, Vec<Expression>), ReprError>
fn get_for<'a>( &self, decl: &'a DeclarationPtr, ) -> Option<MappedRwLockReadGuard<'a, RawRwLock, dyn ReprStateStored>>
fn deserialize_state( &self, val: Value, ) -> Result<Box<dyn ReprStateStored>, Error>
Trait Implementations§
impl Collect for &'static dyn ReprRuleStored
Source§impl Debug for dyn ReprRuleStored
impl Debug for dyn ReprRuleStored
Source§impl<'de> Deserialize<'de> for &'static dyn ReprRuleStored
impl<'de> Deserialize<'de> for &'static dyn ReprRuleStored
Source§fn deserialize<D>(
deserializer: D,
) -> Result<&'static dyn ReprRuleStored, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<&'static dyn ReprRuleStored, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for dyn ReprRuleStored
Source§impl Hash for dyn ReprRuleStored
impl Hash for dyn ReprRuleStored
Source§impl Ord for dyn ReprRuleStored
impl Ord for dyn ReprRuleStored
Source§impl PartialEq for dyn ReprRuleStored
impl PartialEq for dyn ReprRuleStored
Source§impl PartialOrd for dyn ReprRuleStored
impl PartialOrd for dyn ReprRuleStored
Source§impl Serialize for &'static dyn ReprRuleStored
impl Serialize for &'static dyn ReprRuleStored
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".