yog-data 0.12.0

Yog Data — Yog's domain over Substrate Data: kinds of content, tags, .yres entries, texts, images and colours.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
//! A value that isn't what a format's own form takes.

use substrate_data::{Problem, Reader, ValueRef};

/// "expected `what`, found …": for a form [`substrate_data::Expected`]
/// has no word for (`"auto"`, `"full"` or six numbers).
pub fn expected(cx: &mut Reader<'_>, what: &str, found: &ValueRef<'_>) {
    cx.problem_of(
        Problem::Expected,
        format!("expected {what}, found {}", found.kind()),
    );
}