pub trait HdkT: HdiT {
Show 37 methods
// Required methods
fn get_agent_activity(
&self,
get_agent_activity_input: GetAgentActivityInput,
) -> ExternResult<AgentActivity>;
fn query(&self, filter: ChainQueryFilter) -> ExternResult<Vec<Record>>;
fn sign(&self, sign: Sign) -> ExternResult<Signature>;
fn sign_ephemeral(
&self,
sign_ephemeral: SignEphemeral,
) -> ExternResult<EphemeralSignatures>;
fn create(&self, create_input: CreateInput) -> ExternResult<ActionHash>;
fn update(&self, update_input: UpdateInput) -> ExternResult<ActionHash>;
fn delete(&self, delete_input: DeleteInput) -> ExternResult<ActionHash>;
fn get(&self, get_input: Vec<GetInput>) -> ExternResult<Vec<Option<Record>>>;
fn get_details(
&self,
get_input: Vec<GetInput>,
) -> ExternResult<Vec<Option<Details>>>;
fn accept_countersigning_preflight_request(
&self,
preflight_request: PreflightRequest,
) -> ExternResult<PreflightRequestAcceptance>;
fn agent_info(&self, agent_info_input: ()) -> ExternResult<AgentInfo>;
fn call_info(&self, call_info_input: ()) -> ExternResult<CallInfo>;
fn create_link(
&self,
create_link_input: CreateLinkInput,
) -> ExternResult<ActionHash>;
fn delete_link(
&self,
delete_link_input: DeleteLinkInput,
) -> ExternResult<ActionHash>;
fn get_links(
&self,
get_links_input: Vec<GetLinksInput>,
) -> ExternResult<Vec<Vec<Link>>>;
fn get_link_details(
&self,
get_links_input: Vec<GetLinksInput>,
) -> ExternResult<Vec<LinkDetails>>;
fn count_links(&self, query: LinkQuery) -> ExternResult<usize>;
fn block_agent(
&self,
block_agent_input: BlockAgentInput,
) -> ExternResult<()>;
fn unblock_agent(
&self,
unblock_agent_input: BlockAgentInput,
) -> ExternResult<()>;
fn call(&self, call: Vec<Call>) -> ExternResult<Vec<ZomeCallResponse>>;
fn emit_signal(&self, app_signal: AppSignal) -> ExternResult<()>;
fn send_remote_signal(
&self,
remote_signal: RemoteSignal,
) -> ExternResult<()>;
fn random_bytes(&self, number_of_bytes: u32) -> ExternResult<Bytes>;
fn sys_time(&self, sys_time_input: ()) -> ExternResult<Timestamp>;
fn schedule(&self, scheduled_fn: String) -> ExternResult<()>;
fn sleep(&self, wake_after: Duration) -> ExternResult<()>;
fn x_salsa20_poly1305_shared_secret_create_random(
&self,
key_ref: Option<XSalsa20Poly1305KeyRef>,
) -> ExternResult<XSalsa20Poly1305KeyRef>;
fn x_salsa20_poly1305_shared_secret_export(
&self,
x_salsa20_poly1305_shared_secret_export: XSalsa20Poly1305SharedSecretExport,
) -> ExternResult<XSalsa20Poly1305EncryptedData>;
fn x_salsa20_poly1305_shared_secret_ingest(
&self,
x_salsa20_poly1305_shared_secret_ingest: XSalsa20Poly1305SharedSecretIngest,
) -> ExternResult<XSalsa20Poly1305KeyRef>;
fn x_salsa20_poly1305_encrypt(
&self,
x_salsa20_poly1305_encrypt: XSalsa20Poly1305Encrypt,
) -> ExternResult<XSalsa20Poly1305EncryptedData>;
fn create_x25519_keypair(
&self,
create_x25519_keypair_input: (),
) -> ExternResult<X25519PubKey>;
fn x_25519_x_salsa20_poly1305_encrypt(
&self,
x_25519_x_salsa20_poly1305_encrypt: X25519XSalsa20Poly1305Encrypt,
) -> ExternResult<XSalsa20Poly1305EncryptedData>;
fn ed_25519_x_salsa20_poly1305_encrypt(
&self,
ed_25519_x_salsa20_poly1305_encrypt: Ed25519XSalsa20Poly1305Encrypt,
) -> ExternResult<XSalsa20Poly1305EncryptedData>;
fn create_clone_cell(
&self,
input: CreateCloneCellInput,
) -> ExternResult<ClonedCell>;
fn disable_clone_cell(
&self,
input: DisableCloneCellInput,
) -> ExternResult<()>;
fn enable_clone_cell(
&self,
input: EnableCloneCellInput,
) -> ExternResult<ClonedCell>;
fn delete_clone_cell(&self, input: DeleteCloneCellInput) -> ExternResult<()>;
}
Expand description
When mocking is enabled the mockall crate automatically builds a MockHdkT for us.
ⓘ
let mut mock = MockHdkT::new();
mock_hdk.expect_foo().times(1).etc().etc();
set_hdk(mock_hdk);