Skip to main content

ValueContainer

Enum ValueContainer 

Source
pub enum ValueContainer {
    Scalar(Value),
    Collection(MultiValues),
}
Expand description

A typed value whose scalar or collection shape is explicit.

The shape is never inferred from collection length. In particular, Scalar(Value::Int32(42)) and Collection(MultiValues::Int32(vec![42])) remain distinguishable through conversion and serialization boundaries.

Variants§

§

Scalar(Value)

One typed value.

Tuple Fields

§0: Value

Stored scalar value.

§

Collection(MultiValues)

A homogeneous typed collection.

Tuple Fields

§0: MultiValues

Stored homogeneous collection.

Implementations§

Source§

impl ValueContainer

Source

pub fn to_json_value(&self) -> ValueResult<JsonValue>

Projects this container while preserving concrete collection shape.

Scalar storage uses the natural scalar projection; concrete collection storage always uses a JSON array.

§Returns

The natural JSON representation, except scalar and collection unset values both project to null.

§Errors

Returns the same structured projection error as the contained value.

Source

pub fn to_json_value_with( &self, options: &DataConversionOptions, ) -> ValueResult<JsonValue>

Projects this container using explicit conversion options.

§Parameters
  • options - Controls duration units and precision-loss behavior.
§Returns

The natural JSON representation, except scalar and collection unset values both project to null.

§Errors

Returns the same structured projection error as the contained value.

Source§

impl ValueContainer

Source

pub fn data_type(&self) -> DataType

Returns the stored or declared data type.

§Returns

The scalar or collection element type, including the declared type of unset storage.

Source

pub const fn new_unset_scalar(data_type: DataType) -> Self

Creates an unset scalar container for a declared data type.

§Parameters
  • data_type - Declared scalar type while no value is set.
§Returns

A scalar ValueContainer with explicit unset storage.

Source

pub const fn new_unset_collection(data_type: DataType) -> Self

Creates an unset collection container for a declared element type.

§Parameters
  • data_type - Declared element type while no values are set.
§Returns

A collection ValueContainer with explicit unset storage.

Source

pub const fn is_scalar(&self) -> bool

Returns whether this container has scalar shape.

§Returns

true for ValueContainer::Scalar.

Source

pub const fn as_scalar(&self) -> Option<&Value>

Returns the contained scalar without consuming this container.

§Returns

Some for scalar storage, or None for collection storage.

Source

pub fn into_scalar(self) -> Result<Value, Self>

Consumes this container and returns its scalar value.

§Returns

The contained scalar value when this container has scalar shape.

§Errors

Returns the original container unchanged when it has collection shape.

Source

pub const fn is_collection(&self) -> bool

Returns whether this container has collection shape.

§Returns

true for ValueContainer::Collection.

Source

pub const fn as_collection(&self) -> Option<&MultiValues>

Returns the contained collection without consuming this container.

§Returns

Some for collection storage, or None for scalar storage.

Source

pub fn into_collection(self) -> Result<MultiValues, Self>

Consumes this container and returns its collection values.

§Returns

The contained values when this container has collection shape.

§Errors

Returns the original container unchanged when it has scalar shape.

Source

pub fn is_unset(&self) -> bool

Returns whether the shape contains no concrete value or collection.

§Returns

true when the contained scalar or collection is unset.

Source

pub fn len(&self) -> usize

Returns zero for unset storage, one for a concrete scalar, or the concrete collection length.

§Returns

The number of concrete values represented by this container.

Source

pub fn is_empty(&self) -> bool

Tests whether this container represents no concrete values.

Source

pub fn get_first<T>(&self) -> ValueResult<T>
where T: StrictValueRead,

Strictly reads a scalar or the first collection item as T.

§Type Parameters
  • T - Strict target type.
§Returns

The scalar value or first collection item.

§Errors

Returns ValueError::Missing for unset or empty matching storage and ValueError::TypeMismatch when the stored data type differs.

Source

pub fn get_list<T>(&self) -> ValueResult<Vec<T>>
where T: StrictValueRead,

Strictly reads a scalar as a one-item list or all collection items.

§Type Parameters
  • T - Strict target element type.
§Returns

A one-item scalar list or all collection items.

§Errors

Returns ValueError::Missing for unset matching storage and ValueError::TypeMismatch when the stored data type differs.

Source

pub fn set<S>(&mut self, value: S)
where S: Into<Self>,

Replaces this container, including its shape, from a supported input.

§Type Parameters
§Parameters
  • value - New scalar or collection value.
Source

pub fn add<S>(&mut self, values: S) -> ValueResult<()>
where S: Into<Self>,

Appends values, promoting scalar storage to collection storage when the input contains at least one concrete value. Same-typed empty and unset input is a no-op.

§Type Parameters
§Parameters
  • values - Scalar or collection values to append.
§Returns

Ok(()) after appending or accepting an empty same-typed input.

§Errors

Returns ValueError::TypeMismatch when the appended values have a different data type.

Source

pub fn unset(&mut self)

Removes concrete storage while preserving its shape and data type.

Source

pub fn to_first<T>(&self) -> ValueResult<T>

Converts a scalar or the first collection item to T.

§Type Parameters
  • T - Target conversion type.
§Returns

The converted scalar or first collection item.

§Errors

Returns the mapped qubit-datatype conversion error.

Source

pub fn to_first_with<T>( &self, options: &DataConversionOptions, ) -> ValueResult<T>

Converts a scalar or the first collection item using explicit options.

§Type Parameters
  • T - Target conversion type.
§Parameters
  • options - Conversion options forwarded to the contained value.
§Returns

The converted scalar or first collection item.

§Errors

Returns the mapped qubit-datatype conversion error.

Source

pub fn to_list<T>(&self) -> ValueResult<Vec<T>>

Converts a scalar to a list or converts every collection item.

Scalar strings may be split according to collection conversion options; strings already stored in a collection are never split again.

§Type Parameters
  • T - Target list element type.
§Returns

A converted scalar list or all converted collection items.

§Errors

Returns the mapped single-value or indexed list conversion error.

Source

pub fn to_list_with<T>( &self, options: &DataConversionOptions, ) -> ValueResult<Vec<T>>

Converts to a list using explicit conversion options.

§Type Parameters
  • T - Target list element type.
§Parameters
  • options - Conversion options forwarded to the contained value.
§Returns

A converted scalar list or all converted collection items.

§Errors

Returns the mapped single-value or indexed list conversion error.

Trait Implementations§

Source§

impl Clone for ValueContainer

Source§

fn clone(&self) -> ValueContainer

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ValueContainer

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for ValueContainer

Source§

impl<'a, 'b> From<&'a Vec<&'b str>> for ValueContainer

Source§

fn from(values: &'a Vec<&'b str>) -> Self

Converts to this type from the input type.
Source§

impl<'a, 'b, const N: usize> From<&'a [&'b str; N]> for ValueContainer

Source§

fn from(values: &'a [&'b str; N]) -> Self

Converts to this type from the input type.
Source§

impl<'a, 'b> From<&'a [&'b str]> for ValueContainer

Source§

fn from(values: &'a [&'b str]) -> Self

Converts to this type from the input type.
Source§

impl From<&Vec<BigDecimal>> for ValueContainer

Available on crate feature big-decimal only.
Source§

fn from(values: &Vec<BigDecimal>) -> Self

Converts to this type from the input type.
Source§

impl From<&Vec<BigInt>> for ValueContainer

Available on crate feature big-integer only.
Source§

fn from(values: &Vec<BigInt>) -> Self

Converts to this type from the input type.
Source§

impl From<&Vec<DateTime<Utc>>> for ValueContainer

Available on crate feature chrono only.
Source§

fn from(values: &Vec<DateTime<Utc>>) -> Self

Converts to this type from the input type.
Source§

impl From<&Vec<Duration>> for ValueContainer

Source§

fn from(values: &Vec<Duration>) -> Self

Converts to this type from the input type.
Source§

impl From<&Vec<HashMap<String, String>>> for ValueContainer

Source§

fn from(values: &Vec<HashMap<String, String>>) -> Self

Converts to this type from the input type.
Source§

impl From<&Vec<NaiveDate>> for ValueContainer

Available on crate feature chrono only.
Source§

fn from(values: &Vec<NaiveDate>) -> Self

Converts to this type from the input type.
Source§

impl From<&Vec<NaiveDateTime>> for ValueContainer

Available on crate feature chrono only.
Source§

fn from(values: &Vec<NaiveDateTime>) -> Self

Converts to this type from the input type.
Source§

impl From<&Vec<NaiveTime>> for ValueContainer

Available on crate feature chrono only.
Source§

fn from(values: &Vec<NaiveTime>) -> Self

Converts to this type from the input type.
Source§

impl From<&Vec<String>> for ValueContainer

Source§

fn from(values: &Vec<String>) -> Self

Converts to this type from the input type.
Source§

impl From<&Vec<Url>> for ValueContainer

Available on crate feature url only.
Source§

fn from(values: &Vec<Url>) -> Self

Converts to this type from the input type.
Source§

impl From<&Vec<Value>> for ValueContainer

Available on crate feature json only.
Source§

fn from(values: &Vec<Value>) -> Self

Converts to this type from the input type.
Source§

impl From<&Vec<bool>> for ValueContainer

Source§

fn from(values: &Vec<bool>) -> Self

Converts to this type from the input type.
Source§

impl From<&Vec<char>> for ValueContainer

Source§

fn from(values: &Vec<char>) -> Self

Converts to this type from the input type.
Source§

impl From<&Vec<f32>> for ValueContainer

Source§

fn from(values: &Vec<f32>) -> Self

Converts to this type from the input type.
Source§

impl From<&Vec<f64>> for ValueContainer

Source§

fn from(values: &Vec<f64>) -> Self

Converts to this type from the input type.
Source§

impl From<&Vec<i8>> for ValueContainer

Source§

fn from(values: &Vec<i8>) -> Self

Converts to this type from the input type.
Source§

impl From<&Vec<i16>> for ValueContainer

Source§

fn from(values: &Vec<i16>) -> Self

Converts to this type from the input type.
Source§

impl From<&Vec<i32>> for ValueContainer

Source§

fn from(values: &Vec<i32>) -> Self

Converts to this type from the input type.
Source§

impl From<&Vec<i64>> for ValueContainer

Source§

fn from(values: &Vec<i64>) -> Self

Converts to this type from the input type.
Source§

impl From<&Vec<i128>> for ValueContainer

Source§

fn from(values: &Vec<i128>) -> Self

Converts to this type from the input type.
Source§

impl From<&Vec<u8>> for ValueContainer

Source§

fn from(values: &Vec<u8>) -> Self

Converts to this type from the input type.
Source§

impl From<&Vec<u16>> for ValueContainer

Source§

fn from(values: &Vec<u16>) -> Self

Converts to this type from the input type.
Source§

impl From<&Vec<u32>> for ValueContainer

Source§

fn from(values: &Vec<u32>) -> Self

Converts to this type from the input type.
Source§

impl From<&Vec<u64>> for ValueContainer

Source§

fn from(values: &Vec<u64>) -> Self

Converts to this type from the input type.
Source§

impl From<&Vec<u128>> for ValueContainer

Source§

fn from(values: &Vec<u128>) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<&[BigDecimal; N]> for ValueContainer

Available on crate feature big-decimal only.
Source§

fn from(values: &[BigDecimal; N]) -> Self

Converts to this type from the input type.
Source§

impl From<&[BigDecimal]> for ValueContainer

Available on crate feature big-decimal only.
Source§

fn from(values: &[BigDecimal]) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<&[BigInt; N]> for ValueContainer

Available on crate feature big-integer only.
Source§

fn from(values: &[BigInt; N]) -> Self

Converts to this type from the input type.
Source§

impl From<&[BigInt]> for ValueContainer

Available on crate feature big-integer only.
Source§

fn from(values: &[BigInt]) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<&[DateTime<Utc>; N]> for ValueContainer

Available on crate feature chrono only.
Source§

fn from(values: &[DateTime<Utc>; N]) -> Self

Converts to this type from the input type.
Source§

impl From<&[DateTime<Utc>]> for ValueContainer

Available on crate feature chrono only.
Source§

fn from(values: &[DateTime<Utc>]) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<&[Duration; N]> for ValueContainer

Source§

fn from(values: &[Duration; N]) -> Self

Converts to this type from the input type.
Source§

impl From<&[Duration]> for ValueContainer

Source§

fn from(values: &[Duration]) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<&[HashMap<String, String>; N]> for ValueContainer

Source§

fn from(values: &[HashMap<String, String>; N]) -> Self

Converts to this type from the input type.
Source§

impl From<&[HashMap<String, String>]> for ValueContainer

Source§

fn from(values: &[HashMap<String, String>]) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<&[NaiveDate; N]> for ValueContainer

Available on crate feature chrono only.
Source§

fn from(values: &[NaiveDate; N]) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<&[NaiveDateTime; N]> for ValueContainer

Available on crate feature chrono only.
Source§

fn from(values: &[NaiveDateTime; N]) -> Self

Converts to this type from the input type.
Source§

impl From<&[NaiveDateTime]> for ValueContainer

Available on crate feature chrono only.
Source§

fn from(values: &[NaiveDateTime]) -> Self

Converts to this type from the input type.
Source§

impl From<&[NaiveDate]> for ValueContainer

Available on crate feature chrono only.
Source§

fn from(values: &[NaiveDate]) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<&[NaiveTime; N]> for ValueContainer

Available on crate feature chrono only.
Source§

fn from(values: &[NaiveTime; N]) -> Self

Converts to this type from the input type.
Source§

impl From<&[NaiveTime]> for ValueContainer

Available on crate feature chrono only.
Source§

fn from(values: &[NaiveTime]) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<&[String; N]> for ValueContainer

Source§

fn from(values: &[String; N]) -> Self

Converts to this type from the input type.
Source§

impl From<&[String]> for ValueContainer

Source§

fn from(values: &[String]) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<&[Url; N]> for ValueContainer

Available on crate feature url only.
Source§

fn from(values: &[Url; N]) -> Self

Converts to this type from the input type.
Source§

impl From<&[Url]> for ValueContainer

Available on crate feature url only.
Source§

fn from(values: &[Url]) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<&[Value; N]> for ValueContainer

Available on crate feature json only.
Source§

fn from(values: &[Value; N]) -> Self

Converts to this type from the input type.
Source§

impl From<&[Value]> for ValueContainer

Available on crate feature json only.
Source§

fn from(values: &[Value]) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<&[bool; N]> for ValueContainer

Source§

fn from(values: &[bool; N]) -> Self

Converts to this type from the input type.
Source§

impl From<&[bool]> for ValueContainer

Source§

fn from(values: &[bool]) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<&[char; N]> for ValueContainer

Source§

fn from(values: &[char; N]) -> Self

Converts to this type from the input type.
Source§

impl From<&[char]> for ValueContainer

Source§

fn from(values: &[char]) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<&[f32; N]> for ValueContainer

Source§

fn from(values: &[f32; N]) -> Self

Converts to this type from the input type.
Source§

impl From<&[f32]> for ValueContainer

Source§

fn from(values: &[f32]) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<&[f64; N]> for ValueContainer

Source§

fn from(values: &[f64; N]) -> Self

Converts to this type from the input type.
Source§

impl From<&[f64]> for ValueContainer

Source§

fn from(values: &[f64]) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<&[i8; N]> for ValueContainer

Source§

fn from(values: &[i8; N]) -> Self

Converts to this type from the input type.
Source§

impl From<&[i8]> for ValueContainer

Source§

fn from(values: &[i8]) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<&[i16; N]> for ValueContainer

Source§

fn from(values: &[i16; N]) -> Self

Converts to this type from the input type.
Source§

impl From<&[i16]> for ValueContainer

Source§

fn from(values: &[i16]) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<&[i32; N]> for ValueContainer

Source§

fn from(values: &[i32; N]) -> Self

Converts to this type from the input type.
Source§

impl From<&[i32]> for ValueContainer

Source§

fn from(values: &[i32]) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<&[i64; N]> for ValueContainer

Source§

fn from(values: &[i64; N]) -> Self

Converts to this type from the input type.
Source§

impl From<&[i64]> for ValueContainer

Source§

fn from(values: &[i64]) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<&[i128; N]> for ValueContainer

Source§

fn from(values: &[i128; N]) -> Self

Converts to this type from the input type.
Source§

impl From<&[i128]> for ValueContainer

Source§

fn from(values: &[i128]) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<&[u8; N]> for ValueContainer

Source§

fn from(values: &[u8; N]) -> Self

Converts to this type from the input type.
Source§

impl From<&[u8]> for ValueContainer

Source§

fn from(values: &[u8]) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<&[u16; N]> for ValueContainer

Source§

fn from(values: &[u16; N]) -> Self

Converts to this type from the input type.
Source§

impl From<&[u16]> for ValueContainer

Source§

fn from(values: &[u16]) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<&[u32; N]> for ValueContainer

Source§

fn from(values: &[u32; N]) -> Self

Converts to this type from the input type.
Source§

impl From<&[u32]> for ValueContainer

Source§

fn from(values: &[u32]) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<&[u64; N]> for ValueContainer

Source§

fn from(values: &[u64; N]) -> Self

Converts to this type from the input type.
Source§

impl From<&[u64]> for ValueContainer

Source§

fn from(values: &[u64]) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<&[u128; N]> for ValueContainer

Source§

fn from(values: &[u128; N]) -> Self

Converts to this type from the input type.
Source§

impl From<&[u128]> for ValueContainer

Source§

fn from(values: &[u128]) -> Self

Converts to this type from the input type.
Source§

impl From<&str> for ValueContainer

Source§

fn from(value: &str) -> Self

Converts to this type from the input type.
Source§

impl From<BigDecimal> for ValueContainer

Available on crate feature big-decimal only.
Source§

fn from(value: BigDecimal) -> Self

Converts to this type from the input type.
Source§

impl From<BigInt> for ValueContainer

Available on crate feature big-integer only.
Source§

fn from(value: BigInt) -> Self

Converts to this type from the input type.
Source§

impl From<DateTime<Utc>> for ValueContainer

Available on crate feature chrono only.
Source§

fn from(value: DateTime<Utc>) -> Self

Converts to this type from the input type.
Source§

impl From<Duration> for ValueContainer

Source§

fn from(value: Duration) -> Self

Converts to this type from the input type.
Source§

impl From<HashMap<String, String>> for ValueContainer

Source§

fn from(value: HashMap<String, String>) -> Self

Converts to this type from the input type.
Source§

impl From<MultiValues> for ValueContainer

Source§

fn from(values: MultiValues) -> Self

Converts to this type from the input type.
Source§

impl From<NaiveDate> for ValueContainer

Available on crate feature chrono only.
Source§

fn from(value: NaiveDate) -> Self

Converts to this type from the input type.
Source§

impl From<NaiveDateTime> for ValueContainer

Available on crate feature chrono only.
Source§

fn from(value: NaiveDateTime) -> Self

Converts to this type from the input type.
Source§

impl From<NaiveTime> for ValueContainer

Available on crate feature chrono only.
Source§

fn from(value: NaiveTime) -> Self

Converts to this type from the input type.
Source§

impl From<String> for ValueContainer

Source§

fn from(value: String) -> Self

Converts to this type from the input type.
Source§

impl From<Url> for ValueContainer

Available on crate feature url only.
Source§

fn from(value: Url) -> Self

Converts to this type from the input type.
Source§

impl From<Value> for ValueContainer

Available on crate feature json only.
Source§

fn from(value: Value) -> Self

Converts to this type from the input type.
Source§

impl From<Value> for ValueContainer

Source§

fn from(value: Value) -> Self

Converts to this type from the input type.
Source§

impl From<ValueWirePayloadV1> for ValueContainer

Source§

fn from(value: ValueWirePayloadV1) -> Self

Extracts the shaped runtime value from a V1 payload.

Source§

impl From<ValueWireV1> for ValueContainer

Source§

fn from(value: ValueWireV1) -> Self

Unwraps the runtime container from a V1 DTO.

Source§

impl<'a> From<Vec<&'a str>> for ValueContainer

Source§

fn from(values: Vec<&'a str>) -> Self

Converts to this type from the input type.
Source§

impl From<Vec<BigDecimal>> for ValueContainer

Available on crate feature big-decimal only.
Source§

fn from(values: Vec<BigDecimal>) -> Self

Converts to this type from the input type.
Source§

impl From<Vec<BigInt>> for ValueContainer

Available on crate feature big-integer only.
Source§

fn from(values: Vec<BigInt>) -> Self

Converts to this type from the input type.
Source§

impl From<Vec<DateTime<Utc>>> for ValueContainer

Available on crate feature chrono only.
Source§

fn from(values: Vec<DateTime<Utc>>) -> Self

Converts to this type from the input type.
Source§

impl From<Vec<Duration>> for ValueContainer

Source§

fn from(values: Vec<Duration>) -> Self

Converts to this type from the input type.
Source§

impl From<Vec<HashMap<String, String>>> for ValueContainer

Source§

fn from(values: Vec<HashMap<String, String>>) -> Self

Converts to this type from the input type.
Source§

impl From<Vec<NaiveDate>> for ValueContainer

Available on crate feature chrono only.
Source§

fn from(values: Vec<NaiveDate>) -> Self

Converts to this type from the input type.
Source§

impl From<Vec<NaiveDateTime>> for ValueContainer

Available on crate feature chrono only.
Source§

fn from(values: Vec<NaiveDateTime>) -> Self

Converts to this type from the input type.
Source§

impl From<Vec<NaiveTime>> for ValueContainer

Available on crate feature chrono only.
Source§

fn from(values: Vec<NaiveTime>) -> Self

Converts to this type from the input type.
Source§

impl From<Vec<String>> for ValueContainer

Source§

fn from(values: Vec<String>) -> Self

Converts to this type from the input type.
Source§

impl From<Vec<Url>> for ValueContainer

Available on crate feature url only.
Source§

fn from(values: Vec<Url>) -> Self

Converts to this type from the input type.
Source§

impl From<Vec<Value>> for ValueContainer

Available on crate feature json only.
Source§

fn from(values: Vec<Value>) -> Self

Converts to this type from the input type.
Source§

impl From<Vec<bool>> for ValueContainer

Source§

fn from(values: Vec<bool>) -> Self

Converts to this type from the input type.
Source§

impl From<Vec<char>> for ValueContainer

Source§

fn from(values: Vec<char>) -> Self

Converts to this type from the input type.
Source§

impl From<Vec<f32>> for ValueContainer

Source§

fn from(values: Vec<f32>) -> Self

Converts to this type from the input type.
Source§

impl From<Vec<f64>> for ValueContainer

Source§

fn from(values: Vec<f64>) -> Self

Converts to this type from the input type.
Source§

impl From<Vec<i8>> for ValueContainer

Source§

fn from(values: Vec<i8>) -> Self

Converts to this type from the input type.
Source§

impl From<Vec<i16>> for ValueContainer

Source§

fn from(values: Vec<i16>) -> Self

Converts to this type from the input type.
Source§

impl From<Vec<i32>> for ValueContainer

Source§

fn from(values: Vec<i32>) -> Self

Converts to this type from the input type.
Source§

impl From<Vec<i64>> for ValueContainer

Source§

fn from(values: Vec<i64>) -> Self

Converts to this type from the input type.
Source§

impl From<Vec<i128>> for ValueContainer

Source§

fn from(values: Vec<i128>) -> Self

Converts to this type from the input type.
Source§

impl From<Vec<u8>> for ValueContainer

Source§

fn from(values: Vec<u8>) -> Self

Converts to this type from the input type.
Source§

impl From<Vec<u16>> for ValueContainer

Source§

fn from(values: Vec<u16>) -> Self

Converts to this type from the input type.
Source§

impl From<Vec<u32>> for ValueContainer

Source§

fn from(values: Vec<u32>) -> Self

Converts to this type from the input type.
Source§

impl From<Vec<u64>> for ValueContainer

Source§

fn from(values: Vec<u64>) -> Self

Converts to this type from the input type.
Source§

impl From<Vec<u128>> for ValueContainer

Source§

fn from(values: Vec<u128>) -> Self

Converts to this type from the input type.
Source§

impl<'a, const N: usize> From<[&'a str; N]> for ValueContainer

Source§

fn from(values: [&'a str; N]) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<[BigDecimal; N]> for ValueContainer

Available on crate feature big-decimal only.
Source§

fn from(values: [BigDecimal; N]) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<[BigInt; N]> for ValueContainer

Available on crate feature big-integer only.
Source§

fn from(values: [BigInt; N]) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<[DateTime<Utc>; N]> for ValueContainer

Available on crate feature chrono only.
Source§

fn from(values: [DateTime<Utc>; N]) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<[Duration; N]> for ValueContainer

Source§

fn from(values: [Duration; N]) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<[HashMap<String, String>; N]> for ValueContainer

Source§

fn from(values: [HashMap<String, String>; N]) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<[NaiveDate; N]> for ValueContainer

Available on crate feature chrono only.
Source§

fn from(values: [NaiveDate; N]) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<[NaiveDateTime; N]> for ValueContainer

Available on crate feature chrono only.
Source§

fn from(values: [NaiveDateTime; N]) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<[NaiveTime; N]> for ValueContainer

Available on crate feature chrono only.
Source§

fn from(values: [NaiveTime; N]) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<[String; N]> for ValueContainer

Source§

fn from(values: [String; N]) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<[Url; N]> for ValueContainer

Available on crate feature url only.
Source§

fn from(values: [Url; N]) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<[Value; N]> for ValueContainer

Available on crate feature json only.
Source§

fn from(values: [Value; N]) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<[bool; N]> for ValueContainer

Source§

fn from(values: [bool; N]) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<[char; N]> for ValueContainer

Source§

fn from(values: [char; N]) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<[f32; N]> for ValueContainer

Source§

fn from(values: [f32; N]) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<[f64; N]> for ValueContainer

Source§

fn from(values: [f64; N]) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<[i8; N]> for ValueContainer

Source§

fn from(values: [i8; N]) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<[i16; N]> for ValueContainer

Source§

fn from(values: [i16; N]) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<[i32; N]> for ValueContainer

Source§

fn from(values: [i32; N]) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<[i64; N]> for ValueContainer

Source§

fn from(values: [i64; N]) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<[i128; N]> for ValueContainer

Source§

fn from(values: [i128; N]) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<[u8; N]> for ValueContainer

Source§

fn from(values: [u8; N]) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<[u16; N]> for ValueContainer

Source§

fn from(values: [u16; N]) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<[u32; N]> for ValueContainer

Source§

fn from(values: [u32; N]) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<[u64; N]> for ValueContainer

Source§

fn from(values: [u64; N]) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<[u128; N]> for ValueContainer

Source§

fn from(values: [u128; N]) -> Self

Converts to this type from the input type.
Source§

impl From<bool> for ValueContainer

Source§

fn from(value: bool) -> Self

Converts to this type from the input type.
Source§

impl From<char> for ValueContainer

Source§

fn from(value: char) -> Self

Converts to this type from the input type.
Source§

impl From<f32> for ValueContainer

Source§

fn from(value: f32) -> Self

Converts to this type from the input type.
Source§

impl From<f64> for ValueContainer

Source§

fn from(value: f64) -> Self

Converts to this type from the input type.
Source§

impl From<i8> for ValueContainer

Source§

fn from(value: i8) -> Self

Converts to this type from the input type.
Source§

impl From<i16> for ValueContainer

Source§

fn from(value: i16) -> Self

Converts to this type from the input type.
Source§

impl From<i32> for ValueContainer

Source§

fn from(value: i32) -> Self

Converts to this type from the input type.
Source§

impl From<i64> for ValueContainer

Source§

fn from(value: i64) -> Self

Converts to this type from the input type.
Source§

impl From<i128> for ValueContainer

Source§

fn from(value: i128) -> Self

Converts to this type from the input type.
Source§

impl From<u8> for ValueContainer

Source§

fn from(value: u8) -> Self

Converts to this type from the input type.
Source§

impl From<u16> for ValueContainer

Source§

fn from(value: u16) -> Self

Converts to this type from the input type.
Source§

impl From<u32> for ValueContainer

Source§

fn from(value: u32) -> Self

Converts to this type from the input type.
Source§

impl From<u64> for ValueContainer

Source§

fn from(value: u64) -> Self

Converts to this type from the input type.
Source§

impl From<u128> for ValueContainer

Source§

fn from(value: u128) -> Self

Converts to this type from the input type.
Source§

impl Hash for ValueContainer

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for ValueContainer

Source§

fn eq(&self, other: &ValueContainer) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Redact for ValueContainer

Source§

fn redacted(&self) -> Redacted<'_, Self>
where Self: Sized,

Creates a borrowed view using a snapshot of the current default policy. Read more
Source§

fn redacted_with(&self, policy: &RedactionPolicy) -> Redacted<'_, Self>
where Self: Sized,

Creates a borrowed view using a snapshot of policy. Read more
Source§

impl StructuralPartialEq for ValueContainer

Source§

impl<'a> TryFrom<&'a ValueContainer> for ValueWirePayloadRefV1<'a>

Source§

fn try_from(value: &'a ValueContainer) -> Result<Self, Self::Error>

Borrows and validates an explicit shape.

Source§

type Error = ValueWireEncodeError

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

impl<'a> TryFrom<&'a ValueContainer> for ValueWireRefV1<'a>

Source§

fn try_from(value: &'a ValueContainer) -> Result<Self, Self::Error>

Borrows and validates an explicit shape.

Source§

type Error = ValueWireEncodeError

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

impl TryFrom<ValueContainer> for ValueWirePayloadV1

Source§

fn try_from(value: ValueContainer) -> Result<Self, Self::Error>

Validates an explicitly shaped value for use in a V1 payload.

Source§

type Error = ValueWireEncodeError

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

impl TryFrom<ValueContainer> for ValueWireV1

Source§

fn try_from(value: ValueContainer) -> Result<Self, Self::Error>

Wraps an explicit runtime shape in a V1 DTO.

Source§

type Error = ValueWireEncodeError

The type returned in the event of a conversion error.

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> IntoValueDefault<T> for T

Source§

fn into_value_default(self) -> T

Converts this argument into the default value. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.