Function hdk::entry::update_entry[][src]

pub fn update_entry<I, E>(
    hash: HeaderHash,
    input: I
) -> ExternResult<HeaderHash> where
    EntryWithDefId: TryFrom<I, Error = E>,
    WasmError: From<E>, 

Thin wrapper around update for app entries. The hash is the HeaderHash of the deleted element, the input is a TryInto<EntryWithDefId> .

Updates can reference Elements which contain Entry data – namely, Creates and other Updates – but not Deletes or system Elements

As updates can reference elements on other agent’s source chains across unpredictable network topologies, they are treated as a tree structure.

Many updates can point to a single create/update and continue to accumulate as long as agents author them against that element. It is up to happ developers to decide how to ensure the tree branches are walked appropriately and that updates point to the correct element, whatever that means for the happ.

#[hdk_entry(id = "foo")]
struct Foo(u32);

let foo_zero_header_hash: HeaderHash = commit_entry!(Foo(0))?;
let foo_ten_update_header_hash: HeaderHash = update_entry(foo_zero_header_hash, Foo(10))?;

@todo in the future this will be true because we will have the concept of ‘redirects’: Works as an app entry delete+create.

See create_entry See update See delete_entry