MCPcopy Create free account
hub / github.com/LEXUGE/dcompass / NativeScript

Class NativeScript

droute/src/router/script/native.rs:23–30  ·  view source on GitHub ↗

A native "script" engine that allows scripting droute in rust.

Source from the content-addressed store, hash-verified

21
22/// A native "script" engine that allows scripting droute in rust.
23pub struct NativeScript<F, T>
24where
25 F: Fn(Upstreams, Message<Bytes>, Option<QueryContext>) -> T + Send + Sync,
26 T: std::future::Future<Output = Result<Message<Bytes>>> + Send,
27{
28 upstreams: Upstreams,
29 script: F,
30}
31
32#[async_trait]
33impl<F, T> ScriptBackend for NativeScript<F, T>

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected