pub fn cast_from_source<S: DeserializeOwned, V: ClipVariant>(
file: &str,
source: &str,
can_speak: impl Fn(&str) -> bool,
) -> Result<Cast<S>, Vec<ContentError>>Expand description
Parses and validates cast source, attributing errors to file at
each entry’s line: no voice is empty, every key is a speaker that is
NARRATION_SPEAKER or one that can_speak, or such a speaker
followed by the suffix of one of V’s
variants. A key that is a speaker is the
speaker’s, whatever it ends with. Settings S rejects are a parse
error.