pub struct PlainValueRef<'a>(pub &'a Value);Expand description
Serializes a borrowed Value in the same plain JSON shape produced by
Value::to_json_plain, writing directly into the serializer.
Unlike to_json_plain, no intermediate serde_json::Value tree is built:
strings, arrays, hstore maps and composites are serialized by reference.
Used on the hot row-serialization path; to_json_plain remains for callers
that need an owned serde_json::Value. The two are kept in sync by
equivalence tests over every variant.
Tuple Fields§
§0: &'a ValueTrait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for PlainValueRef<'a>
impl<'a> RefUnwindSafe for PlainValueRef<'a>
impl<'a> Send for PlainValueRef<'a>
impl<'a> Sync for PlainValueRef<'a>
impl<'a> Unpin for PlainValueRef<'a>
impl<'a> UnsafeUnpin for PlainValueRef<'a>
impl<'a> UnwindSafe for PlainValueRef<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more