pub trait SourcePrimitive {
// Required methods
fn manifest(&self) -> &SourcePrimitiveManifest;
fn produce(
&self,
parameters: &HashMap<String, ParameterValue>,
ctx: &ExecutionContext,
) -> HashMap<String, Value>;
}Expand description
A source primitive that produces values for graph evaluation.
Statelessness is enforced at registration by manifest validation
(SRC-8, state.allowed == false) and at runtime by capture/replay.
Structural enforcement on top (derive macros, marker traits, newtype
wrappers) was considered and rejected; see
docs/ledger/decisions/rejected-structural-enforcement-of-statelessness.md.
Required Methods§
fn manifest(&self) -> &SourcePrimitiveManifest
fn produce( &self, parameters: &HashMap<String, ParameterValue>, ctx: &ExecutionContext, ) -> HashMap<String, Value>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".