pub struct BatchDecoder { /* private fields */ }Expand description
Batch parsing utilities for high-throughput scenarios
Implementations§
Source§impl BatchDecoder
impl BatchDecoder
pub fn new() -> Self
Sourcepub fn parse_json_stream<T>(&mut self, data: &[u8]) -> Result<Vec<T>>where
T: for<'de> Deserialize<'de>,
pub fn parse_json_stream<T>(&mut self, data: &[u8]) -> Result<Vec<T>>where
T: for<'de> Deserialize<'de>,
Parse multiple JSON objects from a byte stream
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BatchDecoder
impl RefUnwindSafe for BatchDecoder
impl Send for BatchDecoder
impl Sync for BatchDecoder
impl Unpin for BatchDecoder
impl UnwindSafe for BatchDecoder
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more