MCPcopy Create free account
hub / github.com/3Hren/msgpack-rust / visit_map

Method visit_map

src/encode.rs:1454–1467  ·  view source on GitHub ↗
(&mut self, mut visitor: V)

Source from the content-addressed store, hash-verified

1452 }
1453
1454 fn visit_map<V>(&mut self, mut visitor: V) -> Result<(), Error>
1455 where V: serde::ser::MapVisitor,
1456 {
1457 let len = match visitor.len() {
1458 Some(len) => len,
1459 None => panic!("do not know how to serialize a map with no length"),
1460 };
1461
1462 try!(write_map_len(&mut self.wr, len as u32));
1463
1464 while let Some(()) = try!(visitor.visit(self)) { }
1465
1466 Ok(())
1467 }
1468
1469 fn visit_map_elt<K, V>(&mut self, key: K, value: V) -> Result<(), Error>
1470 where K: serde::Serialize,

Callers 1

read_mapMethod · 0.80

Calls 2

write_map_lenFunction · 0.85
visitMethod · 0.80

Tested by

no test coverage detected