pub trait WireFunction: 'static {
type Request: Serialize + DeserializeOwned;
type Response: Serialize + DeserializeOwned;
const NAME: &'static str;
const FALLBACK: FallbackPolicy;
const SUPPORTED_VERSIONS: &'static [u32];
// Required methods
fn dry_run_request() -> Self::Request;
fn dry_run_response() -> Self::Response;
}Expand description
Type-level specification for a wire function exported by a plugin.
Required Associated Constants§
Sourceconst FALLBACK: FallbackPolicy
const FALLBACK: FallbackPolicy
Compile-time fallback policy for this function. Must never be runtime-configurable to prevent security incidents (e.g., skipping signing).
Sourceconst SUPPORTED_VERSIONS: &'static [u32]
const SUPPORTED_VERSIONS: &'static [u32]
Wire protocol versions this function supports. Host advertises max version, plugin chooses compatible version during handshake.
Required Associated Types§
Sourcetype Request: Serialize + DeserializeOwned
type Request: Serialize + DeserializeOwned
Request type for this wire function.
Sourcetype Response: Serialize + DeserializeOwned
type Response: Serialize + DeserializeOwned
Response type for this wire function.
Required Methods§
Sourcefn dry_run_request() -> Self::Request
fn dry_run_request() -> Self::Request
Dry-run request for self_check (skip-handler model: serialize/deserialize round-trip only).
Sourcefn dry_run_response() -> Self::Response
fn dry_run_response() -> Self::Response
Dry-run response for self_check (skip-handler model: serialize/deserialize round-trip only).
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".