Struct holochain_cascade::Cascade [−][src]
pub struct Cascade<Network = HolochainP2pDna> { /* fields omitted */ }
Implementations
Add the authored env to the cascade.
Add the ability to access private entries for this agent.
Add the cache to the cascade.
Add the cache to the cascade.
pub fn with_network<N: HolochainP2pDnaT + Clone>(
self,
network: N,
cache_env: DbWrite<DbKindCache>
) -> Cascade<N>
pub fn with_network<N: HolochainP2pDnaT + Clone>(
self,
network: N,
cache_env: DbWrite<DbKindCache>
) -> Cascade<N>
Add the network and cache to the cascade.
pub fn from_workspace_network<N, AuthorDb, DhtDb>(
workspace: &HostFnWorkspace<AuthorDb, DhtDb>,
network: N
) -> Cascade<N> where
N: HolochainP2pDnaT + Clone,
AuthorDb: ReadAccess<DbKindAuthored>,
DhtDb: ReadAccess<DbKindDht>,
pub async fn retrieve_entry(
&mut self,
hash: EntryHash,
options: NetworkGetOptions
) -> CascadeResult<Option<EntryHashed>>
pub async fn retrieve_entry(
&mut self,
hash: EntryHash,
options: NetworkGetOptions
) -> CascadeResult<Option<EntryHashed>>
Retrieve Entry
from either locally or from an authority.
Data might not have been validated yet by the authority.
pub async fn retrieve_header(
&mut self,
hash: HeaderHash,
options: NetworkGetOptions
) -> CascadeResult<Option<SignedHeaderHashed>>
pub async fn retrieve_header(
&mut self,
hash: HeaderHash,
options: NetworkGetOptions
) -> CascadeResult<Option<SignedHeaderHashed>>
Retrieve SignedHeaderHashed
from either locally or from an authority.
Data might not have been validated yet by the authority.
pub async fn retrieve(
&mut self,
hash: AnyDhtHash,
options: NetworkGetOptions
) -> CascadeResult<Option<Element>>
pub async fn retrieve(
&mut self,
hash: AnyDhtHash,
options: NetworkGetOptions
) -> CascadeResult<Option<Element>>
Retrieve data from either locally or from an authority. Data might not have been validated yet by the authority.
pub async fn get_entry_details(
&mut self,
entry_hash: EntryHash,
options: GetOptions
) -> CascadeResult<Option<EntryDetails>>
pub async fn get_header_details(
&mut self,
header_hash: HeaderHash,
options: GetOptions
) -> CascadeResult<Option<ElementDetails>>
pub async fn dht_get_header(
&mut self,
header_hash: HeaderHash,
options: GetOptions
) -> CascadeResult<Option<Element>>
pub async fn dht_get_header(
&mut self,
header_hash: HeaderHash,
options: GetOptions
) -> CascadeResult<Option<Element>>
Returns the Element for this HeaderHash if it is live by getting the latest available metadata from authorities combined with this agents authored data. Note: Deleted headers are a tombstone set
pub async fn dht_get_entry(
&mut self,
entry_hash: EntryHash,
options: GetOptions
) -> CascadeResult<Option<Element>>
pub async fn dht_get_entry(
&mut self,
entry_hash: EntryHash,
options: GetOptions
) -> CascadeResult<Option<Element>>
pub async fn get_concurrent<I: IntoIterator<Item = AnyDhtHash>>(
&mut self,
hashes: I,
options: GetOptions
) -> CascadeResult<Vec<Option<Element>>>
pub async fn dht_get(
&mut self,
hash: AnyDhtHash,
options: GetOptions
) -> CascadeResult<Option<Element>>
pub async fn dht_get(
&mut self,
hash: AnyDhtHash,
options: GetOptions
) -> CascadeResult<Option<Element>>
Updates the cache with the latest network authority data and returns what is in the cache. This gives you the latest possible picture of the current dht state. Data from your zome call is also added to the cache.
pub async fn get_details(
&mut self,
hash: AnyDhtHash,
options: GetOptions
) -> CascadeResult<Option<Details>>
pub async fn dht_get_links(
&mut self,
key: WireLinkKey,
options: GetLinksOptions
) -> CascadeResult<Vec<Link>>
pub async fn dht_get_links(
&mut self,
key: WireLinkKey,
options: GetLinksOptions
) -> CascadeResult<Vec<Link>>
Gets an links from the cas or cache depending on it’s metadata
pub async fn get_link_details(
&mut self,
key: WireLinkKey,
options: GetLinksOptions
) -> CascadeResult<Vec<(SignedHeaderHashed, Vec<SignedHeaderHashed>)>>
pub async fn get_link_details(
&mut self,
key: WireLinkKey,
options: GetLinksOptions
) -> CascadeResult<Vec<(SignedHeaderHashed, Vec<SignedHeaderHashed>)>>
Return all CreateLink headers and DeleteLink headers ordered by time.
pub async fn get_agent_activity(
&mut self,
agent: AgentPubKey,
query: ChainQueryFilter,
options: GetActivityOptions
) -> CascadeResult<AgentActivityResponse<Element>>
pub async fn get_agent_activity(
&mut self,
agent: AgentPubKey,
query: ChainQueryFilter,
options: GetActivityOptions
) -> CascadeResult<AgentActivityResponse<Element>>
Get agent activity from agent activity authorities. Hashes are requested from the authority and cache for valid chains. Options:
- include_valid_activity will include the valid chain hashes.
- include_rejected_activity will include the invalid chain hashes.
- include_full_headers will fetch the valid headers in parallel (requires include_valid_activity) Query:
- include_entries will also fetch the entries in parallel (requires include_full_headers)
- sequence_range will get all the activity in the exclusive range
- header_type and entry_type will filter the activity (requires include_full_headers)
pub fn get_validation_package_local(
&self,
_hash: &HeaderHash
) -> CascadeResult<Option<Vec<Element>>>
pub fn get_validation_package_local(
&self,
_hash: &HeaderHash
) -> CascadeResult<Option<Vec<Element>>>
Get the validation package if it is cached without going to the network
pub async fn get_validation_package(
&mut self,
_agent: AgentPubKey,
_header: &HeaderHashed
) -> CascadeResult<Option<ValidationPackage>>
Trait Implementations
Auto Trait Implementations
impl<Network = HolochainP2pDna> !RefUnwindSafe for Cascade<Network>
impl<Network = HolochainP2pDna> !UnwindSafe for Cascade<Network>
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