A native "script" engine that allows scripting droute in rust.
| 21 | |
| 22 | /// A native "script" engine that allows scripting droute in rust. |
| 23 | pub struct NativeScript<F, T> |
| 24 | where |
| 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] |
| 33 | impl<F, T> ScriptBackend for NativeScript<F, T> |
nothing calls this directly
no outgoing calls
no test coverage detected