INNER CODE UNIT · Rust
push_uint
Tencent/TNN · third_party/flatbuffers/rust/flexbuffers/src/builder/mod.rs:199
fn push_uint<T: Into<u64>>(&mut self, x: T) {
self.values.push(Value::UInt(x.into()));
}
fn push_int<T: Into<i64>>(&mut self, x: T) {
self.values.push(Value::Int(x.into()));
}
fn push_float<T: Into<f64>>(&mut self, x: T) {
self.values.push(Value::Float(x.into()));
}
fn push_null(&mut self) {
self.values.push(Value::Null);
}
fn push_bool(&mut self, x: bool) {
self.values.push(Value::Bool(x));
}
fn store_blob(&mut self, xs: &[u8]) -> Value {
let length = Value::UInt(xs.len() as u64);
let width = length.width_or_child_width();