pub fn delete_unit(mana_dir: &Path, id: &str) -> Result<DeleteResult, Error>Expand description
Delete a unit and remove all references to it from other units’ dependencies.
§Errors
anyhow::Error— unit not found or I/O failure
§Example
use mana_core::api::delete_unit;
use std::path::Path;
let r = delete_unit(Path::new("/project/.mana"), "1").unwrap();
println!("Deleted: {}", r.title);