Skip to main content

reopen_unit

Function reopen_unit 

Source
pub fn reopen_unit(mana_dir: &Path, id: &str) -> Result<ReopenResult, Error>
Expand description

Reopen a closed unit.

Sets status back to Open, clears closed_at and close_reason, and rebuilds the index.

§Errors

§Example

use mana_core::api::reopen_unit;
use std::path::Path;

let r = reopen_unit(Path::new("/project/.mana"), "1").unwrap();
println!("Reopened: {}", r.unit.id);