Skip to main content

with_node

Function with_node 

Source
pub async fn with_node<F, R>(data_dir: &Path, operation: F) -> Result<R>
where F: FnOnce(IpcClient) -> R,
Expand description

Run a node operation with an already-running daemon client.

The operation is deliberately synchronous so callers can construct and pass a client without opening the node in the CLI process.

ยงErrors

Returns an error when no responsive daemon owns the data directory.