Skip to main content

ForgeQuery

Trait ForgeQuery 

Source
pub trait ForgeQuery:
    Sealed
    + Send
    + Sync
    + 'static {
    type Args: DeserializeOwned + Serialize + Send + Sync;
    type Output: Serialize + Send;

    // Required methods
    fn info() -> FunctionInfo;
    fn execute(
        ctx: &QueryContext,
        args: Self::Args,
    ) -> Pin<Box<dyn Future<Output = Result<Self::Output>> + Send + '_>>;
}
Expand description

A read-only, cacheable, subscribable query function.

Required Associated Types§

Required Methods§

Source

fn info() -> FunctionInfo

Source

fn execute( ctx: &QueryContext, args: Self::Args, ) -> Pin<Box<dyn Future<Output = Result<Self::Output>> + Send + '_>>

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.

Implementors§