pub fn run_and_destroy<F, T>(
    cluster: &Cluster,
    lock: UnlockedFile,
    action: F
) -> Result<T, ClusterError> where
    F: FnOnce() -> T, 
Expand description

Perform action in cluster, destroying the cluster before returning.

Similar to run_and_stop except this attempts to destroy the cluster – i.e. stop the cluster and completely delete its data directory – before returning. If there are other users of the cluster – i.e. if an exclusive lock cannot be acquired during the shutdown phase – then the cluster is left running and is not destroyed.