Skip to main content

parts

Function parts 

Source
pub fn parts<I>(separator: impl Into<String>, parts: I) -> Answer
where I: IntoIterator<Item = Answer>,
Expand description

The answer is several values joined by separator, each judged by its own rule (Python’s TupleAnswer). The text is split keeping empty items, each item is stripped, a wrong number of items fails with Answer::format_message, and otherwise the first failing part’s message wins.