Trait flexbuffers::Pushable [−][src]
pub trait Pushable: Sealed + Sized { fn push_to_builder(self, _: &mut Builder) { ... } }
Expand description
Types that implement the Pushable trait can be written into a Flexbuffer.
All Rust’s standard numbers, u8, u16, u32, u64, i8, i16, i32, i64, f32, f64
,
can all be pushed. They are FlexBufferType::{UInt, Int, Float}
.
Flexbuffers chooses the smallest width that can represent the given number.
Strings can pe pushed, they become FlexBufferType::String
and are stored
with both a length and null terminator.
-
For convenience and speed push typed vectors using rust arrays and slices. Doing so will immediately serialize the data, skipping the
Builder
’s internal cache. -
Pushable cannot not be implemented by any downstream crates.
Provided methods
fn push_to_builder(self, _: &mut Builder)
[src]
Implementations on Foreign Types
Loading content...Implementors
impl Pushable for IndirectFloat
[src]
impl Pushable for IndirectFloat
[src]fn push_to_builder(self, builder: &mut Builder)
[src]
impl Pushable for IndirectInt
[src]
impl Pushable for IndirectInt
[src]fn push_to_builder(self, builder: &mut Builder)
[src]
impl Pushable for IndirectUInt
[src]
impl Pushable for IndirectUInt
[src]