pub struct Jsonb { /* private fields */ }
Expand description

An owned JSON value backed by a Row.

Similar to serde_json::Value, but the conversion to Row is free.

All numbers are represented as f64s. It is not possible to construct a Jsonb from a JSON object that contains integers that cannot be represented exactly as f64s.

Implementations

Constructs a new Jsonb from a serde_json::Value.

Errors if any of the contained integers cannot be represented exactly as an f64.

Parses a Jsonb from a byte slice buf.

Errors if the slice is not valid JSON or if any of the contained integers cannot be represented exactly as an f64.

Constructs a JsonbRef that references the JSON in this Jsonb.

Constructs a Jsonb from a Row containing a single Datum.

Note that row is not checked for validity. Not all Datums are valid JSON.

Consumes this Jsonb and returns the underlying Row.

Trait Implementations

The SQL column type of this Rust type

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Whether this Rust type can represent NULL values

Try to convert a Result whose Ok variant is a Datum into this native Rust type (Self). If it fails the error variant will contain the original result. Read more

Convert this Rust type into a Result containing a Datum, or an error

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

The associated error which can be returned from parsing.

Parses a string s to return a value of this type. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Formats an object with the “alternative” format ({:#}) and returns it.

Returns the argument unchanged.

Attaches the provided Context to this type, returning a WithContext wrapper. Read more

Attaches the current Context to this type, returning a WithContext wrapper. Read more

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

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

Calls U::from(self).

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

Wrap the input message T in a tonic::Request

Upcasts this ProgressEventTimestamp to Any. Read more

Returns the name of the concrete type of this object. Read more

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

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

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