Skip to main content

install

Function install 

Source
pub fn install<F>(reply: F) -> Session
where F: Fn(String, Value) -> Result<Value, Error> + 'static,
Expand description

Install a host for this thread that answers from reply.

reply is handed the action name and its parameters, and answers with the data the host would have produced or an Error for a host that refused.