Skip to main content

handle_invocation

Function handle_invocation 

Source
pub async fn handle_invocation(
    state: &AppState,
    conn_id: &str,
    target: &str,
    args: Vec<Value>,
) -> Result<Option<Value>, String>
Expand description

分发一条客户端 Hub 调用

§返回

  • Ok(Some(value)):带返回值的应答
  • Ok(None):无返回值(仍回 Completion)
  • Err(msg):调用失败(回 Completion error)