Skip to main content

remove

Function remove 

Source
pub fn remove(
    ctx: &Context,
    req: RemoveRequest,
) -> Result<Outcome<PantryContents>, CoreError>
Expand description

Take an item out of the pantry and write it back.

A section left with no items is removed too, because cooklang drops empty sections when it reads a file and keeping one would not survive the next read anyway.

Returns the pantry as it now stands on disk, and any warnings from parsing what was there before.

Only the entry asked for is touched; see what a write touches.

ยงErrors