Function inspect::iter_by_key
source · pub fn iter_by_key<I, K, V>(
iter: impl IntoIterator<IntoIter = I>,
) -> Iterated<I>
Expand description
Wraps an iterator for inspection.
§Example
fn inspect(req: inspect::Request<'_>) {
let v = BTreeMap::from([("foo", 1), ("bar", 2)]);
// Responds with { foo: 1, bar: 2 }.
req.respond().field("v", inspect::iter_by_key(&v));
}