pub struct Implementation {
pub id: ImplId,
pub proves: QualifiedName,
pub sig_hash: Option<TypeId>,
pub environment: Ident,
pub entry: String,
pub cost: ImplProfile,
pub notes: Option<String>,
pub meta: Metadata,
}Expand description
A claim that something proves a proposition.
Fields§
§id: ImplIdWhat this implementation is called.
proves: QualifiedNameThe proposition it claims to prove.
sig_hash: Option<TypeId>The address of that proposition when this was registered.
Present, it catches an implementation that was written against a signature which has since changed — a proof of something that is no longer being asked.
environment: IdentThe environment it runs in.
entry: StringWhat to invoke there. What this means is the environment’s business: a key for a compiled-in function, a name the harness dispatches on.
cost: ImplProfileWhat it claims to cost.
notes: Option<String>Anything worth knowing about it.
meta: MetadataNon-identifying annotations.
Implementations§
Source§impl Implementation
impl Implementation
Sourcepub fn new(
id: impl Into<ImplId>,
proves: QualifiedName,
environment: Ident,
entry: impl Into<String>,
cost: ImplProfile,
) -> Self
pub fn new( id: impl Into<ImplId>, proves: QualifiedName, environment: Ident, entry: impl Into<String>, cost: ImplProfile, ) -> Self
An implementation with a cost and nothing else said about it.
Sourcepub fn cost_key(&self) -> (u8, u8, &str)
pub fn cost_key(&self) -> (u8, u8, &str)
How this implementation sorts against another, cheapest first.
Time, then space, then name — the last only so that two runs of the same workspace agree about which of two equals comes first.
Sourcepub fn memory_key(&self) -> (u8, u8, &str)
pub fn memory_key(&self) -> (u8, u8, &str)
The same, weighing memory ahead of time.