Skip to main content

PluginPayload

Trait PluginPayload 

Source
pub trait PluginPayload:
    Any
    + Send
    + Sync
    + Debug {
    // Required method
    fn plugin_id(&self) -> &'static str;

    // Provided methods
    fn dyn_eq(&self, other: &dyn PluginPayload) -> bool { ... }
    fn memo_content(&self) -> Vec<u8> ⓘ { ... }
}
Expand description

Typed payload of a PlanNode::CustomNode (downcast inside the plugin — never a stringly blob).

Required Methods§

Source

fn plugin_id(&self) -> &'static str

Plugin that minted this payload ("geosparql" in v1).

Provided Methods§

Source

fn dyn_eq(&self, other: &dyn PluginPayload) -> bool

Structural equality for plan reuse/dedup comparisons. The default is “never equal”, which is safe for opaque payloads (they only lose plan-dedup optimizations, never correctness).

Source

fn memo_content(&self) -> Vec<u8> ⓘ

Deterministic content bytes of the payload, used as the payload component of the query-local CustomOp memo key (see ExecutorPlugin for the memoization contract). Two payloads with equal memo_content bytes must produce identical childless-op results within one query. The default — the payload’s Debug rendering — is deterministic for derived Debug impls; a plugin whose Debug is not content-stable should override this with a structured binary serialization.

Implementations§

Source§

impl dyn PluginPayload

Source

pub fn as_any(&self) -> &dyn Any

Downcast hook for PluginPayloadBox::downcast_ref.

Implementors§