Trait piecrust::HostQuery

source ·
pub trait HostQuery: Send + Sync + Fn(&mut [u8], u32) -> u32 { }
Expand description

A query executable on the host.

The buffer containing the argument the contract used to call the query, together with the argument’s length, are passed as arguments to the function, and should be processed first. Once this is done, the implementor should emplace the return of the query in the same buffer, and return the length written.

Implementors§

source§

impl<F> HostQuery for Fwhere F: Send + Sync + Fn(&mut [u8], u32) -> u32,