pub trait ActionTransformer: Sized {
// Required method
fn summon_app_entry<ET>(&self) -> Result<ET, WasmError>
where ET: EntryTypesHelper,
WasmError: From<<ET as EntryTypesHelper>::Error>;
}Expand description
Extend Action transformations
Required Methods§
Sourcefn summon_app_entry<ET>(&self) -> Result<ET, WasmError>
fn summon_app_entry<ET>(&self) -> Result<ET, WasmError>
Get the app entry that this action points to
§Example: Basic Usage
ⓘ
use hdi::prelude::*;
use hdi_extensions::*;
#[hdk_entry_helper]
struct PostEntry {
pub message: String,
}
#[hdk_entry_defs]
#[unit_enum(EntryTypesUnit)]
pub enum EntryTypes {
#[entry_def]
Post(PostEntry),
}
fn test(addr: ActionHash) -> ExternResult<()> {
let action = summon_action( &addr )?.hashed.content;
let entry_type = action.summon_app_entry<EntryTypes>()?;
Ok(())
}Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.