pub trait ReprDeclLevel:
Sized
+ Clone
+ Send
+ Sync
+ Debug
+ Serialize
+ for<'de> Deserialize<'de>
+ 'static {
type Assignment: ReprAssignment;
type DomainLevel: ReprDomainLevel<DeclLevel = Self, Assignment = Self::Assignment>;
const RULE: &'static dyn ReprRuleStored;
// Required methods
fn to_domain_level(self) -> Self::DomainLevel;
fn lookup_via(
&self,
lu: &Box<dyn Fn(&DeclarationPtr) -> Option<Literal> + '_>,
) -> Result<Self::Assignment, ReprUpError>;
fn repr_vars(&self) -> VecDeque<DeclarationPtr>;
// Provided methods
fn down(&self, value: Literal) -> Result<Self::Assignment, ReprDownError> { ... }
fn lookup(
&self,
raw_assignment: &HashMap<Name, Literal>,
) -> Result<Self::Assignment, ReprUpError> { ... }
}Required Associated Constants§
const RULE: &'static dyn ReprRuleStored
Required Associated Types§
type Assignment: ReprAssignment
type DomainLevel: ReprDomainLevel<DeclLevel = Self, Assignment = Self::Assignment>
Required Methods§
Sourcefn to_domain_level(self) -> Self::DomainLevel
fn to_domain_level(self) -> Self::DomainLevel
Convert an instance of this representation back to domain level
Sourcefn lookup_via(
&self,
lu: &Box<dyn Fn(&DeclarationPtr) -> Option<Literal> + '_>,
) -> Result<Self::Assignment, ReprUpError>
fn lookup_via( &self, lu: &Box<dyn Fn(&DeclarationPtr) -> Option<Literal> + '_>, ) -> Result<Self::Assignment, ReprUpError>
Look up the values of representation variables
Sourcefn repr_vars(&self) -> VecDeque<DeclarationPtr>
fn repr_vars(&self) -> VecDeque<DeclarationPtr>
Get the list of representation variables, in an arbitrary order
Provided Methods§
Sourcefn down(&self, value: Literal) -> Result<Self::Assignment, ReprDownError>
fn down(&self, value: Literal) -> Result<Self::Assignment, ReprDownError>
Given an instance of this representation for some variable, and a value of the variable, construct the corresponding assignment of representation variables.
fn lookup( &self, raw_assignment: &HashMap<Name, Literal>, ) -> Result<Self::Assignment, ReprUpError>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".