Skip to main content

print_schema

Function print_schema 

Source
pub fn print_schema(
    recipe: &Recipe,
    name: &str,
    scale: f64,
    converter: &Converter,
    writer: impl Write,
    pretty: bool,
) -> Result<(), Error>
Expand description

Write recipe as a schema.org Recipe JSON-LD object.

pretty indents the JSON. Nothing here can fail except the write itself, which serde_json reports as the underlying io::Error.