pub struct Decoder<T> {
pub data_type: PhantomData<T>,
}Expand description
The decoder for serde_json.
Fields§
§data_type: PhantomData<T>The marker for data type to decode.
Implementations§
Trait Implementations§
Source§impl<T, Buffer> Decoder<Buffer> for Decoder<T>where
T: for<'de> Deserialize<'de>,
Buffer: Buffer,
impl<T, Buffer> Decoder<Buffer> for Decoder<T>where
T: for<'de> Deserialize<'de>,
Buffer: Buffer,
Source§fn decode(
&mut self,
input: &mut Buffer,
) -> Result<Self::Value, DecodeError<Self::Error>>
fn decode( &mut self, input: &mut Buffer, ) -> Result<Self::Value, DecodeError<Self::Error>>
Decode (up to one) value from the buffer, returning the decoded value
accompanied by the amount of bytes consumed from the
buf on success,
or a relevant decoding error.impl<T: Eq> Eq for Decoder<T>
impl<T> StructuralPartialEq for Decoder<T>
Auto Trait Implementations§
impl<T> Freeze for Decoder<T>
impl<T> RefUnwindSafe for Decoder<T>where
T: RefUnwindSafe,
impl<T> Send for Decoder<T>where
T: Send,
impl<T> Sync for Decoder<T>where
T: Sync,
impl<T> Unpin for Decoder<T>where
T: Unpin,
impl<T> UnwindSafe for Decoder<T>where
T: 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