Trait simd_json::prelude::ValueBuilder

source ·
pub trait ValueBuilder<'input>:
    Default
    + From<StaticNode>
    + From<i8>
    + From<i16>
    + From<i32>
    + From<i64>
    + From<u8>
    + From<u16>
    + From<u32>
    + From<u64>
    + From<f32>
    + From<f64>
    + From<bool>
    + From<()>
    + From<String>
    + From<&'input str>
    + From<Cow<'input, str>> {
    // Required methods
    fn array_with_capacity(capacity: usize) -> Self;
    fn object_with_capacity(capacity: usize) -> Self;
    fn null() -> Self;

    // Provided methods
    fn array() -> Self { ... }
    fn object() -> Self { ... }
}
Expand description

Prelude to include needed traits Support of builder methods for traits.

Required Methods§

source

fn array_with_capacity(capacity: usize) -> Self

Returns an empty array with a given capacity

source

fn object_with_capacity(capacity: usize) -> Self

Returns an empty object with a given capacity

source

fn null() -> Self

Returns anull value

Provided Methods§

source

fn array() -> Self

Returns an empty array

source

fn object() -> Self

Returns an empty object

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<'input> ValueBuilder<'input> for simd_json::value::owned::Value

source§

impl<'value> ValueBuilder<'value> for simd_json::value::borrowed::Value<'value>