Skip to main content

declare_if_absent

Function declare_if_absent 

Source
pub fn declare_if_absent(
    root: &Path,
    id: &str,
    title: &str,
    producer: &str,
) -> Result<PathBuf, Error>
Expand description

Declare a surface only when nothing has declared it yet.

A report that is a section of another’s surface still needs that surface to exist — an unreachable section is not a report — but it must never restate the enclosing producer’s identity over the top of it. So: create when absent, leave alone when there.