pub struct Json<S: Sorting> { /* private fields */ }Expand description
JSON codec
Trait Implementations§
Source§impl<S: Sorting> Codec for Json<S>
impl<S: Sorting> Codec for Json<S>
Source§fn decode<'input, 'life0, 'async_trait>(
&'life0 mut self,
data: &'input mut [u8],
_ingest_ns: u64,
meta: Value<'input>,
) -> Pin<Box<dyn Future<Output = Result<Option<(Value<'input>, Value<'input>)>>> + Send + 'async_trait>>where
Self: 'async_trait,
'input: 'async_trait,
'life0: 'async_trait,
fn decode<'input, 'life0, 'async_trait>(
&'life0 mut self,
data: &'input mut [u8],
_ingest_ns: u64,
meta: Value<'input>,
) -> Pin<Box<dyn Future<Output = Result<Option<(Value<'input>, Value<'input>)>>> + Send + 'async_trait>>where
Self: 'async_trait,
'input: 'async_trait,
'life0: 'async_trait,
Decode a binary, into an Value
If
None is returned, no data could be encoded, but we don’t exactly triggered an error condition. Read moreSource§fn encode<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
data: &'life1 Value<'_>,
_meta: &'life2 Value<'_>,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn encode<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
data: &'life1 Value<'_>,
_meta: &'life2 Value<'_>,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Encodes a Value into a binary Read more
Source§fn boxed_clone(&self) -> Box<dyn Codec>
fn boxed_clone(&self) -> Box<dyn Codec>
special clone method for getting clone functionality
into a this trait referenced as trait object
otherwise we cannot use this type inside structs that need to be
Clone.
See: crate::codec::rest::BoxedCodecAuto Trait Implementations§
impl<S> Freeze for Json<S>
impl<S> RefUnwindSafe for Json<S>where
S: RefUnwindSafe,
impl<S> Send for Json<S>
impl<S> Sync for Json<S>
impl<S> Unpin for Json<S>where
S: Unpin,
impl<S> UnwindSafe for Json<S>where
S: UnwindSafe,
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