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

Interface ScriptBackend

droute/src/router/script/mod.rs:160–167  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

158/// A script backend routes every message with query context and the query itself.
159#[async_trait]
160pub trait ScriptBackend: Validatable<Error = ScriptError> {
161 /// Process the query.
162 async fn route(
163 &self,
164 query: Message<Bytes>,
165 ctx: Option<QueryContext>,
166 ) -> Result<Message<Bytes>>;
167}
168
169/// A script builder is a type that builds itself into a script backend.
170#[async_trait(?Send)]

Callers

nothing calls this directly

Implementers 2

native.rsdroute/src/router/script/native.rs
mod.rsdroute/src/router/script/rune_scriptin

Calls

no outgoing calls

Tested by

no test coverage detected