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§
Provided Methods§
Sourcefn dyn_eq(&self, other: &dyn PluginPayload) -> bool
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).
Sourcefn memo_content(&self) -> Vec<u8> ⓘ
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
impl dyn PluginPayload
Sourcepub fn as_any(&self) -> &dyn Any
pub fn as_any(&self) -> &dyn Any
Downcast hook for PluginPayloadBox::downcast_ref.