Skip to main content

reap

Function reap 

Source
pub fn reap(
    path: &Path,
    on_close: OnClose,
    engine_for: &dyn Fn(EngineKind) -> Option<Engine>,
    run: &mut dyn FnMut(&EngineCommand) -> Result<String, EngineError>,
) -> Result<Reaped>
Expand description

Reads the list at path, stops what stop_orphans says to, and writes back what stays listed.

A list that was kept or could not be read is not written at all: the first because the person asked for the containers to stay, the second because it is the person’s to see as it is. Nor is a list that comes out holding what it held: a write to this file is what starts the service, so a run that wrote it back unchanged would start the next one, and that the next.

§Errors

Returns the I/O error when what stays listed cannot be written.