pub fn load(ctx: &Context) -> Result<Outcome<PantryContents>, CoreError>Expand description
Read and parse the pantry configuration Context::pantry names.
Reads through ConfigSource, so an editor can hand
over pantry text it has not saved instead of a path.
A pantry that parses with warnings โ an unknown attribute on an item, say โ
is a successful load carrying those warnings as Outcome::diagnostics,
located in the pantry file when it came from one.
ยงErrors
CoreError::MissingConfigif the context carries no pantry at all. Every query below reports this the same way, because a pantry query with no pantry has no answer โ unlikeshopping_list::generate, which simply subtracts nothing.CoreError::Ioif a path-backed configuration cannot be read.CoreError::Configif it cannot be parsed at all, naming the file it came from.