INNER CODE UNIT · Rust
start_map
Tencent/TNN · third_party/flatbuffers/rust/flexbuffers/src/builder/mod.rs:271
pub fn start_map(&'a mut self) -> MapBuilder<'a> {
self.reset();
MapBuilder {
builder: self,
start: None,
}
}
/// Resets the builder and builds a new flexbuffer with the pushed value at the root.
pub fn build_singleton<P: Pushable>(&mut self, p: P) {
self.reset();
p.push_to_builder(self);
let root = self.values.pop().unwrap();
store_root(&mut self.buffer, root);
}
fn push<P: Pushable>(&mut self, p: P) {
p.push_to_builder(self);
}
/// Stores the values past `previous_end` as a map or vector depending on `is_map`.