Function hdk::entry::create_entry[][src]

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

Create an app entry.

Apps define app entries by registering entry def ids with the entry_defs callback and serialize the entry content when committing to the source chain.

This function accepts any input that implements TryInto<EntryWithDefId> . The default impls from the #[hdk_entry( .. )] and [ entry_def! ] macros include this.

With generic type handling it may make sense to directly construct EntryWithDefId and create .


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

See get and get_details for more information on CRUD.