FieldBuffer

Trait FieldBuffer 

Source
pub trait FieldBuffer<'data>: AsRef<[JsonField<'data, 'data>]> {
    // Provided methods
    fn into_json_object(self) -> JsonObject<Self>
       where Self: Sized { ... }
    fn as_json_object(&self) -> JsonObject<&Self> { ... }
}
Expand description

trait for an optionally mutable collection of JSON object fields

Provided Methods§

Source

fn into_json_object(self) -> JsonObject<Self>
where Self: Sized,

convenience one-liner to call JsonObject::wrap_init on this Sized type, consuming it

Source

fn as_json_object(&self) -> JsonObject<&Self>

convenience one-liner to call JsonObject::wrap_init on an immutable reference to this type

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<'a, T: AsRef<[JsonField<'a, 'a>]>> FieldBuffer<'a> for T

FieldBuffer is automatically implemented for all types that implement AsRef<[JsonField<’data,’data>]>