pub struct Encode<'a>(pub &'a Value);Expand description
A serde::Serialize wrapper that streams a stmt::Value as JSON.
Object entries whose value is Value::Null are omitted entirely — an
Option::None field produces a missing key, not an explicit null.
Non-finite floats (NaN / infinity, which have no JSON form) encode as
null. Shapes with no JSON representation (Record, Bytes,
SparseRecord) are a serialization error — document-stored values reach
the driver as Object / List, never Record.
Tuple Fields§
§0: &'a ValueTrait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Encode<'a>
impl<'a> RefUnwindSafe for Encode<'a>
impl<'a> Send for Encode<'a>
impl<'a> Sync for Encode<'a>
impl<'a> Unpin for Encode<'a>
impl<'a> UnsafeUnpin for Encode<'a>
impl<'a> UnwindSafe for Encode<'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