JsonDeserializer

Struct JsonDeserializer 

Source
pub struct JsonDeserializer<'a> { /* private fields */ }
Expand description

JSON deserializer that implements the ShapeDeserializer trait.

Trait Implementations§

Source§

impl<'a> ShapeDeserializer for JsonDeserializer<'a>

Source§

fn read_struct( &mut self, schema: &Schema, consumer: &mut dyn FnMut(&Schema, &mut dyn ShapeDeserializer) -> Result<(), SerdeError>, ) -> Result<(), SerdeError>

Reads a structure from the deserializer. Read more
Source§

fn read_list( &mut self, _schema: &Schema, consumer: &mut dyn FnMut(&mut dyn ShapeDeserializer) -> Result<(), SerdeError>, ) -> Result<(), SerdeError>

Reads a list from the deserializer. Read more
Source§

fn read_map( &mut self, _schema: &Schema, consumer: &mut dyn FnMut(String, &mut dyn ShapeDeserializer) -> Result<(), SerdeError>, ) -> Result<(), SerdeError>

Reads a map from the deserializer. Read more
Source§

fn read_boolean(&mut self, _schema: &Schema) -> Result<bool, SerdeError>

Reads a boolean value.
Source§

fn read_byte(&mut self, _schema: &Schema) -> Result<i8, SerdeError>

Reads a byte (i8) value.
Source§

fn read_short(&mut self, _schema: &Schema) -> Result<i16, SerdeError>

Reads a short (i16) value.
Source§

fn read_integer(&mut self, _schema: &Schema) -> Result<i32, SerdeError>

Reads an integer (i32) value.
Source§

fn read_long(&mut self, _schema: &Schema) -> Result<i64, SerdeError>

Reads a long (i64) value.
Source§

fn read_float(&mut self, _schema: &Schema) -> Result<f32, SerdeError>

Reads a float (f32) value.
Source§

fn read_double(&mut self, _schema: &Schema) -> Result<f64, SerdeError>

Reads a double (f64) value.
Source§

fn read_big_integer( &mut self, _schema: &Schema, ) -> Result<BigInteger, SerdeError>

Reads a big integer value.
Source§

fn read_big_decimal( &mut self, _schema: &Schema, ) -> Result<BigDecimal, SerdeError>

Reads a big decimal value.
Source§

fn read_string(&mut self, _schema: &Schema) -> Result<String, SerdeError>

Reads a string value.
Source§

fn read_blob(&mut self, _schema: &Schema) -> Result<Blob, SerdeError>

Reads a blob (byte array) value.
Source§

fn read_string_list( &mut self, _schema: &Schema, ) -> Result<Vec<String>, SerdeError>

Reads a list of strings.
Source§

fn read_blob_list(&mut self, _schema: &Schema) -> Result<Vec<Blob>, SerdeError>

Reads a list of blobs.
Source§

fn read_integer_list( &mut self, _schema: &Schema, ) -> Result<Vec<i32>, SerdeError>

Reads a list of integers.
Source§

fn read_long_list(&mut self, _schema: &Schema) -> Result<Vec<i64>, SerdeError>

Reads a list of longs.
Source§

fn read_string_string_map( &mut self, _schema: &Schema, ) -> Result<HashMap<String, String>, SerdeError>

Reads a map with string values.
Source§

fn read_timestamp(&mut self, schema: &Schema) -> Result<DateTime, SerdeError>

Reads a timestamp value.
Source§

fn read_document(&mut self, _schema: &Schema) -> Result<Document, SerdeError>

Reads a document value.
Source§

fn is_null(&self) -> bool

Checks if the current value is null. Read more
Source§

fn read_null(&mut self) -> Result<(), SerdeError>

Consumes a null value, advancing past it. Read more
Source§

fn container_size(&self) -> Option<usize>

Returns the size of the current container if known. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for JsonDeserializer<'a>

§

impl<'a> RefUnwindSafe for JsonDeserializer<'a>

§

impl<'a> Send for JsonDeserializer<'a>

§

impl<'a> Sync for JsonDeserializer<'a>

§

impl<'a> Unpin for JsonDeserializer<'a>

§

impl<'a> UnwindSafe for JsonDeserializer<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
§

impl<Unshared, Shared> IntoShared<Shared> for Unshared
where Shared: FromUnshared<Unshared>,

§

fn into_shared(self) -> Shared

Creates a shared type from an unshared type.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more