pub struct JsonPayload {
pub raw: Bytes,
pub parsed: Option<Arc<Value>>,
pub is_valid: bool,
}
Expand description
JSON payload with zero-copy support
Fields§
§raw: Bytes
Raw JSON bytes (zero-copy when possible)
parsed: Option<Arc<Value>>
Parsed JSON value (lazily evaluated)
is_valid: bool
Whether the raw bytes are valid JSON
Trait Implementations§
Source§impl Clone for JsonPayload
impl Clone for JsonPayload
Source§fn clone(&self) -> JsonPayload
fn clone(&self) -> JsonPayload
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl !Freeze for JsonPayload
impl RefUnwindSafe for JsonPayload
impl Send for JsonPayload
impl Sync for JsonPayload
impl Unpin for JsonPayload
impl UnwindSafe for JsonPayload
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