Skip to main content

guarded

Function guarded 

Source
pub fn guarded<T, E>(
    path: &str,
    f: impl FnOnce() -> Result<T, E>,
    failed: impl FnOnce(Problem) -> E,
) -> Result<T, E>
Expand description

What f gives, or — should the engine ever panic on a design — a problem saying so, so that no design file can take the server or its watcher down.