Struct holochain_state::source_chain::SourceChain [−][src]
pub struct SourceChain<AuthorDb = DbWrite<DbKindAuthored>, DhtDb = DbWrite<DbKindDht>> { /* fields omitted */ }
Implementations
Writable functions for a source chain with write access.
pub async fn accept_countersigning_preflight_request(
&self,
preflight_request: PreflightRequest,
agent_index: u8
) -> SourceChainResult<CounterSigningAgentState>
pub async fn put_countersigned(
&self,
zome: Option<Zome>,
entry: Entry,
chain_top_ordering: ChainTopOrdering
) -> SourceChainResult<HeaderHash>
pub async fn put<H: HeaderInner, B: HeaderBuilder<H>>(
&self,
zome: Option<Zome>,
header_builder: B,
maybe_entry: Option<Entry>,
chain_top_ordering: ChainTopOrdering
) -> SourceChainResult<HeaderHash>
pub fn flush<'life0, 'life_self, 'async_recursion>(
&'life_self self,
network: &'life0 (dyn HolochainP2pDnaT + Send + Sync)
) -> Pin<Box<dyn Future<Output = SourceChainResult<Vec<(Option<Zome>, SignedHeaderHashed)>>> + Send + 'async_recursion>> where
'life0: 'async_recursion,
'life_self: 'async_recursion,
impl<AuthorDb, DhtDb> SourceChain<AuthorDb, DhtDb> where
AuthorDb: ReadAccess<DbKindAuthored>,
DhtDb: ReadAccess<DbKindDht>,
impl<AuthorDb, DhtDb> SourceChain<AuthorDb, DhtDb> where
AuthorDb: ReadAccess<DbKindAuthored>,
DhtDb: ReadAccess<DbKindDht>,
pub async fn new(
vault: AuthorDb,
dht_env: DhtDb,
keystore: MetaLairClient,
author: AgentPubKey
) -> SourceChainResult<Self>
Take a snapshot of the scratch space that will not remain in sync with future updates.
This has to clone all the data because we can’t return references to constructed data.
Accessor for the chain head that will be used at flush time to check the “as at” for ordering integrity etc.
pub async fn valid_cap_grant(
&self,
check_function: GrantedFunction,
check_agent: AgentPubKey,
check_secret: Option<CapSecret>
) -> SourceChainResult<Option<CapGrant>>
Query Headers in the source chain.
This returns a Vec rather than an iterator because it is intended to be
used by the query
host function, which crosses the wasm boundary
If there is a countersigning session get the StoreEntry op to send to the entry authorities.
Trait Implementations
Performs the conversion.
Auto Trait Implementations
impl<AuthorDb = DbWrite<DbKindAuthored>, DhtDb = DbWrite<DbKindDht>> !RefUnwindSafe for SourceChain<AuthorDb, DhtDb>
impl<AuthorDb, DhtDb> Send for SourceChain<AuthorDb, DhtDb> where
AuthorDb: Send,
DhtDb: Send,
impl<AuthorDb, DhtDb> Sync for SourceChain<AuthorDb, DhtDb> where
AuthorDb: Sync,
DhtDb: Sync,
impl<AuthorDb, DhtDb> Unpin for SourceChain<AuthorDb, DhtDb> where
AuthorDb: Unpin,
DhtDb: Unpin,
impl<AuthorDb = DbWrite<DbKindAuthored>, DhtDb = DbWrite<DbKindDht>> !UnwindSafe for SourceChain<AuthorDb, DhtDb>
Blanket Implementations
fn type_id_compat(&self) -> TypeId
fn type_id_compat(&self) -> TypeId
TODO: once 1.33.0 is the minimum supported compiler version, remove Any::type_id_compat and use StdAny::type_id instead. https://github.com/rust-lang/rust/issues/27745 Read more
Mutably borrows from an owned value. Read more
fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more