pub trait ValueBuffer<'a>: AsRef<[JsonValue<'a>]> {
// Provided methods
fn into_json_array(self) -> JsonArray<Self>
where Self: Sized { ... }
fn as_json_array(&self) -> JsonArray<&Self> { ... }
}Expand description
trait for an optionally mutable collection of JSON array values
Provided Methods§
Sourcefn into_json_array(self) -> JsonArray<Self>where
Self: Sized,
fn into_json_array(self) -> JsonArray<Self>where
Self: Sized,
convenience one-liner to call JsonArray::wrap_init on this Sized type, consuming it
Sourcefn as_json_array(&self) -> JsonArray<&Self>
fn as_json_array(&self) -> JsonArray<&Self>
convenience one-liner to call JsonArray::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§
impl<'a, T: AsRef<[JsonValue<'a>]>> ValueBuffer<'a> for T
ValueBuffer is automatically implemented for all types that implement AsRef<[JsonField<’data,’data>]>