pub trait CellConductorReadHandleT: Send + Sync {
    // Required methods
    fn cell_id(&self) -> &CellId;
    fn call_zome<'life0, 'async_trait>(
        &'life0 self,
        call: ZomeCall,
        workspace_lock: SourceChainWorkspace
    ) -> Pin<Box<dyn Future<Output = ConductorApiResult<ZomeCallResult>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_zome(
        &self,
        dna_hash: &DnaHash,
        zome_name: &ZomeName
    ) -> ConductorApiResult<Zome>;
    fn get_entry_def(&self, key: &EntryDefBufferKey) -> Option<EntryDef>;
    fn witness_nonce_from_calling_agent<'life0, 'async_trait>(
        &'life0 self,
        agent: AgentPubKey,
        nonce: Nonce256Bits,
        expires: Timestamp
    ) -> Pin<Box<dyn Future<Output = ConductorApiResult<WitnessNonceResult>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn find_cell_with_role_alongside_cell<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        cell_id: &'life1 CellId,
        role_name: &'life2 RoleName
    ) -> Pin<Box<dyn Future<Output = ConductorResult<Option<CellId>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn block<'life0, 'async_trait>(
        &'life0 self,
        input: Block
    ) -> Pin<Box<dyn Future<Output = DatabaseResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn unblock<'life0, 'async_trait>(
        &'life0 self,
        input: Block
    ) -> Pin<Box<dyn Future<Output = DatabaseResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn is_blocked<'life0, 'async_trait>(
        &'life0 self,
        input: BlockTargetId,
        timestamp: Timestamp
    ) -> Pin<Box<dyn Future<Output = DatabaseResult<bool>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

A minimal set of functionality needed from the conductor by host functions.

Required Methods§

source

fn cell_id(&self) -> &CellId

Get this cell id

source

fn call_zome<'life0, 'async_trait>( &'life0 self, call: ZomeCall, workspace_lock: SourceChainWorkspace ) -> Pin<Box<dyn Future<Output = ConductorApiResult<ZomeCallResult>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Invoke a zome function on a Cell

source

fn get_zome( &self, dna_hash: &DnaHash, zome_name: &ZomeName ) -> ConductorApiResult<Zome>

Get a zome from this cell’s Dna

source

fn get_entry_def(&self, key: &EntryDefBufferKey) -> Option<EntryDef>

Get a EntryDef from the EntryDefBufferKey

source

fn witness_nonce_from_calling_agent<'life0, 'async_trait>( &'life0 self, agent: AgentPubKey, nonce: Nonce256Bits, expires: Timestamp ) -> Pin<Box<dyn Future<Output = ConductorApiResult<WitnessNonceResult>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Try to put the nonce from a calling agent in the db. Fails with a stale result if a newer nonce exists.

source

fn find_cell_with_role_alongside_cell<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, cell_id: &'life1 CellId, role_name: &'life2 RoleName ) -> Pin<Box<dyn Future<Output = ConductorResult<Option<CellId>>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Find the first cell ID across all apps the given cell id is in that is assigned to the given role.

source

fn block<'life0, 'async_trait>( &'life0 self, input: Block ) -> Pin<Box<dyn Future<Output = DatabaseResult<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Expose block functionality to zomes.

source

fn unblock<'life0, 'async_trait>( &'life0 self, input: Block ) -> Pin<Box<dyn Future<Output = DatabaseResult<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Expose unblock functionality to zomes.

source

fn is_blocked<'life0, 'async_trait>( &'life0 self, input: BlockTargetId, timestamp: Timestamp ) -> Pin<Box<dyn Future<Output = DatabaseResult<bool>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Expose is_blocked functionality to zomes.

Implementors§

source§

impl CellConductorReadHandleT for CellConductorApi

source§

impl CellConductorReadHandleT for MockCellConductorReadHandleT

A minimal set of functionality needed from the conductor by host functions.