pub enum ParsingMode {
Traditional,
ZeroCopy,
}Expand description
Parsing mode for message deserialization
Controls how JSON strings are parsed into Message types.
Variants§
Traditional
Traditional parsing via intermediate serde_json::Value
This is the safest option that creates an intermediate Value before
deserializing to Message. Use this when you need maximum compatibility.
ZeroCopy
Zero-copy parsing directly from string
Parses directly from the input string without creating an intermediate
Value. This is faster and uses less memory, especially for large messages.
§Performance
- ~30-50% less memory allocation for large messages
- ~10-20% faster parsing time
Trait Implementations§
Source§impl Clone for ParsingMode
impl Clone for ParsingMode
Source§fn clone(&self) -> ParsingMode
fn clone(&self) -> ParsingMode
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 moreSource§impl Debug for ParsingMode
impl Debug for ParsingMode
Source§impl Default for ParsingMode
impl Default for ParsingMode
Source§fn default() -> ParsingMode
fn default() -> ParsingMode
Returns the “default value” for a type. Read more
Source§impl PartialEq for ParsingMode
impl PartialEq for ParsingMode
impl Copy for ParsingMode
impl Eq for ParsingMode
impl StructuralPartialEq for ParsingMode
Auto Trait Implementations§
impl Freeze for ParsingMode
impl RefUnwindSafe for ParsingMode
impl Send for ParsingMode
impl Sync for ParsingMode
impl Unpin for ParsingMode
impl UnsafeUnpin for ParsingMode
impl UnwindSafe for ParsingMode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.