pub trait RibosomeT: Sized + Debug + Send + Sync {
Show 21 methods fn dna_def(&self) -> &DnaDefHashed; fn dna_hash(&self) -> &DnaHash; fn dna_file(&self) -> &DnaFile; fn zome_info(&self, zome: Zome) -> RibosomeResult<ZomeInfo>; fn get_integrity_zome(&self, zome_index: &ZomeIndex) -> Option<IntegrityZome>; fn call_iterator<I: Invocation + 'static>(
        &self,
        host_context: HostContext,
        invocation: I
    ) -> CallIterator<Self, I>; fn maybe_call<I: Invocation + 'static>(
        &self,
        host_context: HostContext,
        invocation: &I,
        zome: &Zome,
        to_call: &FunctionName
    ) -> Result<Option<ExternIO>, RibosomeError>; fn get_const_fn(
        &self,
        zome: &Zome,
        name: &str
    ) -> Result<Option<i32>, RibosomeError>; fn run_genesis_self_check(
        &self,
        access: GenesisSelfCheckHostAccess,
        invocation: GenesisSelfCheckInvocation
    ) -> RibosomeResult<GenesisSelfCheckResult>; fn run_init(
        &self,
        access: InitHostAccess,
        invocation: InitInvocation
    ) -> RibosomeResult<InitResult>; fn run_migrate_agent(
        &self,
        access: MigrateAgentHostAccess,
        invocation: MigrateAgentInvocation
    ) -> RibosomeResult<MigrateAgentResult>; fn run_entry_defs(
        &self,
        access: EntryDefsHostAccess,
        invocation: EntryDefsInvocation
    ) -> RibosomeResult<EntryDefsResult>; fn run_validation_package(
        &self,
        access: ValidationPackageHostAccess,
        invocation: ValidationPackageInvocation
    ) -> RibosomeResult<ValidationPackageResult>; fn run_post_commit(
        &self,
        access: PostCommitHostAccess,
        invocation: PostCommitInvocation
    ) -> RibosomeResult<()>; fn run_validate(
        &self,
        access: ValidateHostAccess,
        invocation: ValidateInvocation
    ) -> RibosomeResult<ValidateResult>; fn call_zome_function(
        &self,
        access: ZomeCallHostAccess,
        invocation: ZomeCallInvocation
    ) -> RibosomeResult<ZomeCallResponse>; fn zome_types(&self) -> &Arc<GlobalZomeTypes>; fn zomes_to_invoke(&self, zomes_to_invoke: ZomesToInvoke) -> Vec<Zome> { ... } fn zome_name_to_id(&self, zome_name: &ZomeName) -> RibosomeResult<ZomeIndex> { ... } fn list_callbacks(&self) { ... } fn list_zome_fns(&self) { ... }
}
Expand description

Interface for a Ribosome. Currently used only for mocking, as our only real concrete type is RealRibosome

Required Methods§

Get a value from a const wasm function.

This is really a stand in until Rust can properly support const wasm values.

This allows getting values from wasm without the need for any translation. The same technique can be used with the wasmer cli to validate these values without needing to make holochain a dependency.

source

fn run_entry_defs(
    &self,
    access: EntryDefsHostAccess,
    invocation: EntryDefsInvocation
) -> RibosomeResult<EntryDefsResult>

source

fn run_post_commit(
    &self,
    access: PostCommitHostAccess,
    invocation: PostCommitInvocation
) -> RibosomeResult<()>

Helper function for running a validation callback. Calls private fn do_callback! under the hood.

Runs the specified zome fn. Returns the cursor used by HDK, so that it can be passed on to source chain manager for transactional writes

Provided Methods§

@todo list out all the available callbacks and maybe cache them somewhere

@todo list out all the available zome functions and maybe cache them somewhere

Implementors§

Interface for a Ribosome. Currently used only for mocking, as our only real concrete type is RealRibosome