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.

§Examples

use qubit_value::ValueContainer;

let scalar = ValueContainer::from(42_i32);
let collection = ValueContainer::from(vec![42_i32]);
assert!(scalar.is_scalar());
assert!(collection.is_collection());

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 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 fn get_first_ref<'a, T: ?Sized>(&'a self) -> ValueResult<&'a T>
where &'a T: TryFrom<&'a Value, Error = ValueError> + TryFrom<&'a MultiValues, Error = ValueError>,

Strictly borrows the scalar or first collection item without allocating.

The returned reference is tied to this container’s lifetime. The requested type must match the scalar or collection element type.

§Type Parameters
  • T - Stored scalar or element type to borrow.
§Returns

A reference to the scalar or the first collection item.

§Errors

Returns ValueError::Missing when no item is available, or a type conversion error when the stored type does not match T.

§Examples
use qubit_value::ValueContainer;
use qubit_value::ValueError;

let values = ValueContainer::from(vec![String::from("a"), String::from("b")]);
let first: &String = values.get_first_ref().unwrap();
assert_eq!(first, "a");
let empty = ValueContainer::from(Vec::<String>::new());
assert!(matches!(empty.get_first_ref::<String>(), Err(ValueError::Missing(_))));
Source

pub fn get_slice<'a, T>(&'a self) -> ValueResult<&'a [T]>
where &'a T: TryFrom<&'a Value, Error = ValueError>, &'a [T]: TryFrom<&'a MultiValues, Error = ValueError>,

Strictly borrows a scalar as a one-item slice or a complete collection.

The returned slice is tied to this container’s lifetime. The requested element type must match the stored type.

§Type Parameters
  • T - Stored element type of the borrowed slice.
§Returns

A one-item slice for a scalar, or all collection items. An empty collection returns an empty slice.

§Errors

Returns ValueError::Missing when an unset scalar or collection has the requested type, or ValueError::TypeMismatch when the stored type does not match T. A concrete empty collection returns an empty slice.

§Examples
use qubit_datatype::DataType;

use qubit_value::ValueContainer;
use qubit_value::ValueError;

let values = ValueContainer::from(vec![String::from("a"), String::from("b")]);
let all: &[String] = values.get_slice().unwrap();
assert_eq!(all.len(), 2);
let empty = ValueContainer::from(Vec::<String>::new());
assert!(empty.get_slice::<String>().unwrap().is_empty());
let unset_scalar = ValueContainer::new_unset_scalar(DataType::String);
let unset_collection = ValueContainer::new_unset_collection(DataType::String);
assert!(matches!(unset_scalar.get_slice::<String>(), Err(ValueError::Missing(_))));
assert!(matches!(unset_collection.get_slice::<String>(), Err(ValueError::Missing(_))));
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 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 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 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.

§Returns

true for unset storage or a concrete empty collection.

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 to_first<T>(&self) -> ValueResult<T>

Available on crate feature converter only.

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, policy: &ConversionPolicy, limits: &ConversionLimits, ) -> ValueResult<T>

Available on crate feature converter only.

Converts a scalar or the first collection item using explicit policy and limits.

§Type Parameters
  • T - Target conversion type.
§Parameters
  • policy - Conversion policy forwarded to the contained value.
  • limits - Conversion limits 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_first_in<T>( &self, session: &mut ConversionSession<'_>, ) -> ValueResult<T>

Available on crate feature converter only.

Converts the scalar or first collection item using an existing conversion session.

§Type Parameters
  • T - Target conversion type.
§Parameters
  • session - Caller-owned session providing policy, limits, and budget.
§Returns

The converted scalar or first collection item.

§Errors

Returns the mapped missing, conversion, or budget error.

Source

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

Available on crate feature converter only.

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

Scalar strings may be split according to collection conversion policy; 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, policy: &ConversionPolicy, limits: &ConversionLimits, ) -> ValueResult<Vec<T>>

Available on crate feature converter only.

Converts to a list using explicit conversion policy and limits.

§Type Parameters
  • T - Target list element type.
§Parameters
  • policy - Conversion policy forwarded to the contained value.
  • limits - Conversion limits 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.

Source

pub fn to_list_in<T>( &self, session: &mut ConversionSession<'_>, ) -> ValueResult<Vec<T>>

Available on crate feature converter only.

Converts this container to a list using an existing conversion session.

§Type Parameters
  • T - Target list element type.
§Parameters
  • session - Caller-owned session providing policy, limits, and budget.
§Returns

A converted scalar list or all converted collection items.

§Errors

Returns the mapped missing, conversion, indexed-list, or budget error.

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

impl ValueContainer

Source

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

Available on crate features converter and json only.

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.

For natural JSON projection, max_text_bytes bounds each string value and each formatted number or rich-value text by its UTF-8 byte length, including strings inside materialized JSON. Object keys are excluded from this per-item bound but still consume applicable key and cumulative input, output, and payload budgets. This is neither a cumulative text limit nor a limit on escaped JSON encoding size.

§Errors

Returns the same structured projection error as the contained value.

Source

pub fn to_json_value_with( &self, policy: &ConversionPolicy, limits: &ConversionLimits, ) -> ValueResult<JsonValue>

Available on crate features converter and json only.

Projects this container using explicit conversion policy and limits.

§Parameters
  • policy - Controls duration units and precision-loss behavior.
  • limits - Bounds conversion resource consumption.
§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.

Trait Implementations§

Source§

impl Clone for ValueContainer

Source§

fn clone(&self) -> Self

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

Copies each string into an owned collection, preserving order. An empty vector creates a concrete empty collection.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

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

Source§

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

Copies each string into an owned collection, preserving order. An empty array creates a concrete empty collection.

§Type Parameters
  • N - Number of input array elements.
§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

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

Source§

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

Copies each string into an owned collection, preserving order. An empty slice creates a concrete empty collection.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<&Vec<BigDecimal>> for ValueContainer

Available on crate feature big-decimal only.
Source§

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

Clones the elements into an owned collection, preserving order. An empty vector creates a concrete empty collection.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<&Vec<BigInt>> for ValueContainer

Available on crate feature big-integer only.
Source§

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

Clones the elements into an owned collection, preserving order. An empty vector creates a concrete empty collection.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

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

Available on crate feature chrono only.
Source§

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

Clones the elements into an owned collection, preserving order. An empty vector creates a concrete empty collection.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<&Vec<Duration>> for ValueContainer

Source§

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

Clones the elements into an owned collection, preserving order. An empty vector creates a concrete empty collection.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

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

Source§

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

Clones the elements into an owned collection, preserving order. An empty vector creates a concrete empty collection.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<&Vec<NaiveDate>> for ValueContainer

Available on crate feature chrono only.
Source§

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

Clones the elements into an owned collection, preserving order. An empty vector creates a concrete empty collection.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<&Vec<NaiveDateTime>> for ValueContainer

Available on crate feature chrono only.
Source§

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

Clones the elements into an owned collection, preserving order. An empty vector creates a concrete empty collection.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<&Vec<NaiveTime>> for ValueContainer

Available on crate feature chrono only.
Source§

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

Clones the elements into an owned collection, preserving order. An empty vector creates a concrete empty collection.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<&Vec<String>> for ValueContainer

Source§

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

Clones the elements into an owned collection, preserving order. An empty vector creates a concrete empty collection.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<&Vec<Url>> for ValueContainer

Available on crate feature url only.
Source§

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

Clones the elements into an owned collection, preserving order. An empty vector creates a concrete empty collection.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<&Vec<Value>> for ValueContainer

Available on crate feature json only.
Source§

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

Clones the elements into an owned collection, preserving order. An empty vector creates a concrete empty collection.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<&Vec<bool>> for ValueContainer

Source§

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

Clones the elements into an owned collection, preserving order. An empty vector creates a concrete empty collection.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<&Vec<char>> for ValueContainer

Source§

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

Clones the elements into an owned collection, preserving order. An empty vector creates a concrete empty collection.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<&Vec<f32>> for ValueContainer

Source§

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

Clones the elements into an owned collection, preserving order. An empty vector creates a concrete empty collection.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<&Vec<f64>> for ValueContainer

Source§

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

Clones the elements into an owned collection, preserving order. An empty vector creates a concrete empty collection.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<&Vec<i8>> for ValueContainer

Source§

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

Clones the elements into an owned collection, preserving order. An empty vector creates a concrete empty collection.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<&Vec<i16>> for ValueContainer

Source§

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

Clones the elements into an owned collection, preserving order. An empty vector creates a concrete empty collection.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<&Vec<i32>> for ValueContainer

Source§

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

Clones the elements into an owned collection, preserving order. An empty vector creates a concrete empty collection.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<&Vec<i64>> for ValueContainer

Source§

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

Clones the elements into an owned collection, preserving order. An empty vector creates a concrete empty collection.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<&Vec<i128>> for ValueContainer

Source§

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

Clones the elements into an owned collection, preserving order. An empty vector creates a concrete empty collection.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<&Vec<u8>> for ValueContainer

Source§

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

Clones the elements into an owned collection, preserving order. An empty vector creates a concrete empty collection.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<&Vec<u16>> for ValueContainer

Source§

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

Clones the elements into an owned collection, preserving order. An empty vector creates a concrete empty collection.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<&Vec<u32>> for ValueContainer

Source§

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

Clones the elements into an owned collection, preserving order. An empty vector creates a concrete empty collection.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<&Vec<u64>> for ValueContainer

Source§

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

Clones the elements into an owned collection, preserving order. An empty vector creates a concrete empty collection.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<&Vec<u128>> for ValueContainer

Source§

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

Clones the elements into an owned collection, preserving order. An empty vector creates a concrete empty collection.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

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

Available on crate feature big-decimal only.
Source§

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

Clones the elements into an owned collection, preserving order. An empty array creates a concrete empty collection.

§Type Parameters
  • N - Number of input array elements.
§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<&[BigDecimal]> for ValueContainer

Available on crate feature big-decimal only.
Source§

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

Clones the elements into an owned collection, preserving order. An empty slice creates a concrete empty collection.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

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

Available on crate feature big-integer only.
Source§

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

Clones the elements into an owned collection, preserving order. An empty array creates a concrete empty collection.

§Type Parameters
  • N - Number of input array elements.
§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<&[BigInt]> for ValueContainer

Available on crate feature big-integer only.
Source§

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

Clones the elements into an owned collection, preserving order. An empty slice creates a concrete empty collection.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

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

Clones the elements into an owned collection, preserving order. An empty array creates a concrete empty collection.

§Type Parameters
  • N - Number of input array elements.
§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

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

Available on crate feature chrono only.
Source§

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

Clones the elements into an owned collection, preserving order. An empty slice creates a concrete empty collection.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

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

Source§

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

Clones the elements into an owned collection, preserving order. An empty array creates a concrete empty collection.

§Type Parameters
  • N - Number of input array elements.
§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<&[Duration]> for ValueContainer

Source§

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

Clones the elements into an owned collection, preserving order. An empty slice creates a concrete empty collection.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

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

Source§

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

Clones the elements into an owned collection, preserving order. An empty array creates a concrete empty collection.

§Type Parameters
  • N - Number of input array elements.
§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

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

Source§

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

Clones the elements into an owned collection, preserving order. An empty slice creates a concrete empty collection.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

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

Available on crate feature chrono only.
Source§

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

Clones the elements into an owned collection, preserving order. An empty array creates a concrete empty collection.

§Type Parameters
  • N - Number of input array elements.
§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

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

Available on crate feature chrono only.
Source§

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

Clones the elements into an owned collection, preserving order. An empty array creates a concrete empty collection.

§Type Parameters
  • N - Number of input array elements.
§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<&[NaiveDateTime]> for ValueContainer

Available on crate feature chrono only.
Source§

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

Clones the elements into an owned collection, preserving order. An empty slice creates a concrete empty collection.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<&[NaiveDate]> for ValueContainer

Available on crate feature chrono only.
Source§

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

Clones the elements into an owned collection, preserving order. An empty slice creates a concrete empty collection.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

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

Available on crate feature chrono only.
Source§

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

Clones the elements into an owned collection, preserving order. An empty array creates a concrete empty collection.

§Type Parameters
  • N - Number of input array elements.
§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<&[NaiveTime]> for ValueContainer

Available on crate feature chrono only.
Source§

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

Clones the elements into an owned collection, preserving order. An empty slice creates a concrete empty collection.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

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

Source§

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

Clones the elements into an owned collection, preserving order. An empty array creates a concrete empty collection.

§Type Parameters
  • N - Number of input array elements.
§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<&[String]> for ValueContainer

Source§

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

Clones the elements into an owned collection, preserving order. An empty slice creates a concrete empty collection.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

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

Available on crate feature url only.
Source§

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

Clones the elements into an owned collection, preserving order. An empty array creates a concrete empty collection.

§Type Parameters
  • N - Number of input array elements.
§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<&[Url]> for ValueContainer

Available on crate feature url only.
Source§

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

Clones the elements into an owned collection, preserving order. An empty slice creates a concrete empty collection.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

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

Available on crate feature json only.
Source§

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

Clones the elements into an owned collection, preserving order. An empty array creates a concrete empty collection.

§Type Parameters
  • N - Number of input array elements.
§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<&[Value]> for ValueContainer

Available on crate feature json only.
Source§

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

Clones the elements into an owned collection, preserving order. An empty slice creates a concrete empty collection.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

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

Source§

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

Clones the elements into an owned collection, preserving order. An empty array creates a concrete empty collection.

§Type Parameters
  • N - Number of input array elements.
§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<&[bool]> for ValueContainer

Source§

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

Clones the elements into an owned collection, preserving order. An empty slice creates a concrete empty collection.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

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

Source§

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

Clones the elements into an owned collection, preserving order. An empty array creates a concrete empty collection.

§Type Parameters
  • N - Number of input array elements.
§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<&[char]> for ValueContainer

Source§

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

Clones the elements into an owned collection, preserving order. An empty slice creates a concrete empty collection.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

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

Source§

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

Clones the elements into an owned collection, preserving order. An empty array creates a concrete empty collection.

§Type Parameters
  • N - Number of input array elements.
§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<&[f32]> for ValueContainer

Source§

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

Clones the elements into an owned collection, preserving order. An empty slice creates a concrete empty collection.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

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

Source§

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

Clones the elements into an owned collection, preserving order. An empty array creates a concrete empty collection.

§Type Parameters
  • N - Number of input array elements.
§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<&[f64]> for ValueContainer

Source§

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

Clones the elements into an owned collection, preserving order. An empty slice creates a concrete empty collection.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

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

Source§

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

Clones the elements into an owned collection, preserving order. An empty array creates a concrete empty collection.

§Type Parameters
  • N - Number of input array elements.
§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<&[i8]> for ValueContainer

Source§

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

Clones the elements into an owned collection, preserving order. An empty slice creates a concrete empty collection.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

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

Source§

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

Clones the elements into an owned collection, preserving order. An empty array creates a concrete empty collection.

§Type Parameters
  • N - Number of input array elements.
§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<&[i16]> for ValueContainer

Source§

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

Clones the elements into an owned collection, preserving order. An empty slice creates a concrete empty collection.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

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

Source§

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

Clones the elements into an owned collection, preserving order. An empty array creates a concrete empty collection.

§Type Parameters
  • N - Number of input array elements.
§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<&[i32]> for ValueContainer

Source§

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

Clones the elements into an owned collection, preserving order. An empty slice creates a concrete empty collection.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

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

Source§

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

Clones the elements into an owned collection, preserving order. An empty array creates a concrete empty collection.

§Type Parameters
  • N - Number of input array elements.
§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<&[i64]> for ValueContainer

Source§

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

Clones the elements into an owned collection, preserving order. An empty slice creates a concrete empty collection.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

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

Source§

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

Clones the elements into an owned collection, preserving order. An empty array creates a concrete empty collection.

§Type Parameters
  • N - Number of input array elements.
§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<&[i128]> for ValueContainer

Source§

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

Clones the elements into an owned collection, preserving order. An empty slice creates a concrete empty collection.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

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

Source§

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

Clones the elements into an owned collection, preserving order. An empty array creates a concrete empty collection.

§Type Parameters
  • N - Number of input array elements.
§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<&[u8]> for ValueContainer

Source§

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

Clones the elements into an owned collection, preserving order. An empty slice creates a concrete empty collection.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

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

Source§

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

Clones the elements into an owned collection, preserving order. An empty array creates a concrete empty collection.

§Type Parameters
  • N - Number of input array elements.
§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<&[u16]> for ValueContainer

Source§

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

Clones the elements into an owned collection, preserving order. An empty slice creates a concrete empty collection.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

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

Source§

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

Clones the elements into an owned collection, preserving order. An empty array creates a concrete empty collection.

§Type Parameters
  • N - Number of input array elements.
§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<&[u32]> for ValueContainer

Source§

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

Clones the elements into an owned collection, preserving order. An empty slice creates a concrete empty collection.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

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

Source§

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

Clones the elements into an owned collection, preserving order. An empty array creates a concrete empty collection.

§Type Parameters
  • N - Number of input array elements.
§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<&[u64]> for ValueContainer

Source§

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

Clones the elements into an owned collection, preserving order. An empty slice creates a concrete empty collection.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

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

Source§

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

Clones the elements into an owned collection, preserving order. An empty array creates a concrete empty collection.

§Type Parameters
  • N - Number of input array elements.
§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<&[u128]> for ValueContainer

Source§

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

Clones the elements into an owned collection, preserving order. An empty slice creates a concrete empty collection.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<&str> for ValueContainer

Source§

fn from(value: &str) -> Self

Copies the text into an owned scalar string.

§Parameters
  • value - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<BigDecimal> for ValueContainer

Available on crate feature big-decimal only.
Source§

fn from(value: BigDecimal) -> Self

Creates a scalar container by taking ownership of value.

§Parameters
  • value - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<BigInt> for ValueContainer

Available on crate feature big-integer only.
Source§

fn from(value: BigInt) -> Self

Creates a scalar container by taking ownership of value.

§Parameters
  • value - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<DateTime<Utc>> for ValueContainer

Available on crate feature chrono only.
Source§

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

Creates a scalar container by taking ownership of value.

§Parameters
  • value - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<Duration> for ValueContainer

Source§

fn from(value: Duration) -> Self

Creates a scalar container by taking ownership of value.

§Parameters
  • value - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

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

Source§

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

Creates a scalar container by taking ownership of value.

§Parameters
  • value - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<MultiValues> for ValueContainer

Source§

fn from(values: MultiValues) -> Self

Wraps the collection without cloning its elements.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<NaiveDate> for ValueContainer

Available on crate feature chrono only.
Source§

fn from(value: NaiveDate) -> Self

Creates a scalar container by taking ownership of value.

§Parameters
  • value - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<NaiveDateTime> for ValueContainer

Available on crate feature chrono only.
Source§

fn from(value: NaiveDateTime) -> Self

Creates a scalar container by taking ownership of value.

§Parameters
  • value - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<NaiveTime> for ValueContainer

Available on crate feature chrono only.
Source§

fn from(value: NaiveTime) -> Self

Creates a scalar container by taking ownership of value.

§Parameters
  • value - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<String> for ValueContainer

Source§

fn from(value: String) -> Self

Creates a scalar container by taking ownership of value.

§Parameters
  • value - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<Url> for ValueContainer

Available on crate feature url only.
Source§

fn from(value: Url) -> Self

Creates a scalar container by taking ownership of value.

§Parameters
  • value - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<Value> for ValueContainer

Available on crate feature json only.
Source§

fn from(value: Value) -> Self

Creates a scalar container by taking ownership of value.

§Parameters
  • value - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<Value> for ValueContainer

Source§

fn from(value: Value) -> Self

Wraps the value as a scalar without cloning it.

§Parameters
  • value - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<ValueWirePayloadV1> for ValueContainer

Source§

fn from(value: ValueWirePayloadV1) -> Self

Extracts the shaped runtime value from a V1 payload without cloning.

§Parameters
  • value - Owned payload to consume.
§Returns

The preserved runtime container with its original scalar-or-collection shape.

Source§

impl From<ValueWireV1> for ValueContainer

Source§

fn from(value: ValueWireV1) -> Self

Unwraps the runtime container from a V1 DTO.

§Parameters
  • value - Owned DTO whose container is moved into the result.
§Returns

The preserved runtime container without cloning its payload.

Source§

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

Source§

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

Copies each string into an owned collection, preserving order. An empty vector creates a concrete empty collection.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<Vec<BigDecimal>> for ValueContainer

Available on crate feature big-decimal only.
Source§

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

Takes ownership of the vector and its element storage without cloning elements. An empty vector creates a concrete empty collection.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<Vec<BigInt>> for ValueContainer

Available on crate feature big-integer only.
Source§

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

Takes ownership of the vector and its element storage without cloning elements. An empty vector creates a concrete empty collection.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

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

Available on crate feature chrono only.
Source§

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

Takes ownership of the vector and its element storage without cloning elements. An empty vector creates a concrete empty collection.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<Vec<Duration>> for ValueContainer

Source§

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

Takes ownership of the vector and its element storage without cloning elements. An empty vector creates a concrete empty collection.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

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

Source§

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

Takes ownership of the vector and its element storage without cloning elements. An empty vector creates a concrete empty collection.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<Vec<NaiveDate>> for ValueContainer

Available on crate feature chrono only.
Source§

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

Takes ownership of the vector and its element storage without cloning elements. An empty vector creates a concrete empty collection.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<Vec<NaiveDateTime>> for ValueContainer

Available on crate feature chrono only.
Source§

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

Takes ownership of the vector and its element storage without cloning elements. An empty vector creates a concrete empty collection.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<Vec<NaiveTime>> for ValueContainer

Available on crate feature chrono only.
Source§

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

Takes ownership of the vector and its element storage without cloning elements. An empty vector creates a concrete empty collection.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<Vec<String>> for ValueContainer

Source§

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

Takes ownership of the vector and its element storage without cloning elements. An empty vector creates a concrete empty collection.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<Vec<Url>> for ValueContainer

Available on crate feature url only.
Source§

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

Takes ownership of the vector and its element storage without cloning elements. An empty vector creates a concrete empty collection.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<Vec<Value>> for ValueContainer

Available on crate feature json only.
Source§

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

Takes ownership of the vector and its element storage without cloning elements. An empty vector creates a concrete empty collection.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<Vec<bool>> for ValueContainer

Source§

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

Takes ownership of the vector and its element storage without cloning elements. An empty vector creates a concrete empty collection.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<Vec<char>> for ValueContainer

Source§

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

Takes ownership of the vector and its element storage without cloning elements. An empty vector creates a concrete empty collection.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<Vec<f32>> for ValueContainer

Source§

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

Takes ownership of the vector and its element storage without cloning elements. An empty vector creates a concrete empty collection.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<Vec<f64>> for ValueContainer

Source§

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

Takes ownership of the vector and its element storage without cloning elements. An empty vector creates a concrete empty collection.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<Vec<i8>> for ValueContainer

Source§

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

Takes ownership of the vector and its element storage without cloning elements. An empty vector creates a concrete empty collection.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<Vec<i16>> for ValueContainer

Source§

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

Takes ownership of the vector and its element storage without cloning elements. An empty vector creates a concrete empty collection.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<Vec<i32>> for ValueContainer

Source§

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

Takes ownership of the vector and its element storage without cloning elements. An empty vector creates a concrete empty collection.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<Vec<i64>> for ValueContainer

Source§

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

Takes ownership of the vector and its element storage without cloning elements. An empty vector creates a concrete empty collection.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<Vec<i128>> for ValueContainer

Source§

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

Takes ownership of the vector and its element storage without cloning elements. An empty vector creates a concrete empty collection.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<Vec<u8>> for ValueContainer

Source§

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

Takes ownership of the vector and its element storage without cloning elements. An empty vector creates a concrete empty collection.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<Vec<u16>> for ValueContainer

Source§

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

Takes ownership of the vector and its element storage without cloning elements. An empty vector creates a concrete empty collection.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<Vec<u32>> for ValueContainer

Source§

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

Takes ownership of the vector and its element storage without cloning elements. An empty vector creates a concrete empty collection.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<Vec<u64>> for ValueContainer

Source§

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

Takes ownership of the vector and its element storage without cloning elements. An empty vector creates a concrete empty collection.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<Vec<u128>> for ValueContainer

Source§

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

Takes ownership of the vector and its element storage without cloning elements. An empty vector creates a concrete empty collection.

§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

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

Source§

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

Copies each string into an owned collection, preserving order. An empty array creates a concrete empty collection.

§Type Parameters
  • N - Number of input array elements.
§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

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

Available on crate feature big-decimal only.
Source§

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

Moves the array elements into a newly allocated vector, preserving order. An empty array creates a concrete empty collection.

§Type Parameters
  • N - Number of input array elements.
§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

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

Available on crate feature big-integer only.
Source§

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

Moves the array elements into a newly allocated vector, preserving order. An empty array creates a concrete empty collection.

§Type Parameters
  • N - Number of input array elements.
§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

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

Moves the array elements into a newly allocated vector, preserving order. An empty array creates a concrete empty collection.

§Type Parameters
  • N - Number of input array elements.
§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

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

Source§

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

Moves the array elements into a newly allocated vector, preserving order. An empty array creates a concrete empty collection.

§Type Parameters
  • N - Number of input array elements.
§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

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

Source§

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

Moves the array elements into a newly allocated vector, preserving order. An empty array creates a concrete empty collection.

§Type Parameters
  • N - Number of input array elements.
§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

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

Available on crate feature chrono only.
Source§

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

Moves the array elements into a newly allocated vector, preserving order. An empty array creates a concrete empty collection.

§Type Parameters
  • N - Number of input array elements.
§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

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

Available on crate feature chrono only.
Source§

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

Moves the array elements into a newly allocated vector, preserving order. An empty array creates a concrete empty collection.

§Type Parameters
  • N - Number of input array elements.
§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

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

Available on crate feature chrono only.
Source§

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

Moves the array elements into a newly allocated vector, preserving order. An empty array creates a concrete empty collection.

§Type Parameters
  • N - Number of input array elements.
§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

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

Source§

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

Moves the array elements into a newly allocated vector, preserving order. An empty array creates a concrete empty collection.

§Type Parameters
  • N - Number of input array elements.
§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

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

Available on crate feature url only.
Source§

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

Moves the array elements into a newly allocated vector, preserving order. An empty array creates a concrete empty collection.

§Type Parameters
  • N - Number of input array elements.
§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

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

Available on crate feature json only.
Source§

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

Moves the array elements into a newly allocated vector, preserving order. An empty array creates a concrete empty collection.

§Type Parameters
  • N - Number of input array elements.
§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

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

Source§

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

Moves the array elements into a newly allocated vector, preserving order. An empty array creates a concrete empty collection.

§Type Parameters
  • N - Number of input array elements.
§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

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

Source§

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

Moves the array elements into a newly allocated vector, preserving order. An empty array creates a concrete empty collection.

§Type Parameters
  • N - Number of input array elements.
§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

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

Source§

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

Moves the array elements into a newly allocated vector, preserving order. An empty array creates a concrete empty collection.

§Type Parameters
  • N - Number of input array elements.
§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

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

Source§

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

Moves the array elements into a newly allocated vector, preserving order. An empty array creates a concrete empty collection.

§Type Parameters
  • N - Number of input array elements.
§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

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

Source§

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

Moves the array elements into a newly allocated vector, preserving order. An empty array creates a concrete empty collection.

§Type Parameters
  • N - Number of input array elements.
§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

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

Source§

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

Moves the array elements into a newly allocated vector, preserving order. An empty array creates a concrete empty collection.

§Type Parameters
  • N - Number of input array elements.
§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

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

Source§

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

Moves the array elements into a newly allocated vector, preserving order. An empty array creates a concrete empty collection.

§Type Parameters
  • N - Number of input array elements.
§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

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

Source§

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

Moves the array elements into a newly allocated vector, preserving order. An empty array creates a concrete empty collection.

§Type Parameters
  • N - Number of input array elements.
§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

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

Source§

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

Moves the array elements into a newly allocated vector, preserving order. An empty array creates a concrete empty collection.

§Type Parameters
  • N - Number of input array elements.
§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

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

Source§

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

Moves the array elements into a newly allocated vector, preserving order. An empty array creates a concrete empty collection.

§Type Parameters
  • N - Number of input array elements.
§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

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

Source§

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

Moves the array elements into a newly allocated vector, preserving order. An empty array creates a concrete empty collection.

§Type Parameters
  • N - Number of input array elements.
§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

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

Source§

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

Moves the array elements into a newly allocated vector, preserving order. An empty array creates a concrete empty collection.

§Type Parameters
  • N - Number of input array elements.
§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

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

Source§

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

Moves the array elements into a newly allocated vector, preserving order. An empty array creates a concrete empty collection.

§Type Parameters
  • N - Number of input array elements.
§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

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

Source§

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

Moves the array elements into a newly allocated vector, preserving order. An empty array creates a concrete empty collection.

§Type Parameters
  • N - Number of input array elements.
§Parameters
  • values - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<bool> for ValueContainer

Source§

fn from(value: bool) -> Self

Creates a scalar container by taking ownership of value.

§Parameters
  • value - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<char> for ValueContainer

Source§

fn from(value: char) -> Self

Creates a scalar container by taking ownership of value.

§Parameters
  • value - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<f32> for ValueContainer

Source§

fn from(value: f32) -> Self

Creates a scalar container by taking ownership of value.

§Parameters
  • value - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<f64> for ValueContainer

Source§

fn from(value: f64) -> Self

Creates a scalar container by taking ownership of value.

§Parameters
  • value - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<i8> for ValueContainer

Source§

fn from(value: i8) -> Self

Creates a scalar container by taking ownership of value.

§Parameters
  • value - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<i16> for ValueContainer

Source§

fn from(value: i16) -> Self

Creates a scalar container by taking ownership of value.

§Parameters
  • value - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<i32> for ValueContainer

Source§

fn from(value: i32) -> Self

Creates a scalar container by taking ownership of value.

§Parameters
  • value - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<i64> for ValueContainer

Source§

fn from(value: i64) -> Self

Creates a scalar container by taking ownership of value.

§Parameters
  • value - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<i128> for ValueContainer

Source§

fn from(value: i128) -> Self

Creates a scalar container by taking ownership of value.

§Parameters
  • value - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<u8> for ValueContainer

Source§

fn from(value: u8) -> Self

Creates a scalar container by taking ownership of value.

§Parameters
  • value - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<u16> for ValueContainer

Source§

fn from(value: u16) -> Self

Creates a scalar container by taking ownership of value.

§Parameters
  • value - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<u32> for ValueContainer

Source§

fn from(value: u32) -> Self

Creates a scalar container by taking ownership of value.

§Parameters
  • value - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<u64> for ValueContainer

Source§

fn from(value: u64) -> Self

Creates a scalar container by taking ownership of value.

§Parameters
  • value - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

Source§

impl From<u128> for ValueContainer

Source§

fn from(value: u128) -> Self

Creates a scalar container by taking ownership of value.

§Parameters
  • value - Input converted with the ownership behavior described above.
§Returns

A container preserving the input data type and scalar or collection shape.

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: &Self) -> 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

Available on crate feature redact only.
Source§

fn write_redacted(&self, writer: &mut RedactionWriter<'_>)

Writes the selected container payload through the shared session.

§Parameters
  • writer: Borrowed writer for the active redaction session; receives the classified representation without modifying the source value.
Source§

impl StructuralPartialEq for ValueContainer

Source§

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

Source§

type Error = ValueWireEncodeError

V1 representation validation failure; the borrowed input is unchanged.

Source§

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

Borrows and validates an explicit shape.

§Parameters
  • value - Explicit scalar-or-collection value to validate and borrow.
§Returns

A validated V1 payload borrowing the original input without cloning.

§Errors

Returns the representation validation errors documented by Self::from_container.

Source§

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

Source§

type Error = ValueWireEncodeError

Validation failure when the borrowed input cannot be represented in V1.

Source§

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

Validates and borrows the input without cloning its payload.

§Parameters
  • value - Explicit scalar-or-collection value to validate and borrow for 'a.
§Returns

A borrowed V1 envelope preserving the input shape.

§Errors

Returns the same representational validation errors as Self::from_container.

Source§

impl TryFrom<ValueContainer> for ValueWirePayloadV1

Source§

type Error = ValueWireEncodeError

Validation failure when the runtime value cannot satisfy the V1 wire contract.

Source§

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

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

§Parameters
  • value - Scalar-or-collection container whose shape and ownership are preserved.
§Returns

A validated owned unversioned V1 payload.

§Errors

Returns ValueWireEncodeError::NonFiniteFloat for a non-finite float, ValueWireEncodeError::BigDecimalScaleTooLarge for a decimal whose exponent is outside V1’s supported range, or ValueWireEncodeError::InstantYearOutOfRange for an instant outside the supported UTC year range. With the json feature, returns JsonNumberNotRoundTrippable if a runtime JSON number in either the scalar or collection shape, including a nested number, cannot preserve its serde_json::Number identity under the V1 number model.

Source§

impl TryFrom<ValueContainer> for ValueWireV1

Source§

type Error = ValueWireEncodeError

Failure to represent the consumed runtime value under the V1 contract.

Source§

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

Wraps an explicit runtime shape in a V1 DTO.

§Parameters
  • value - Scalar-or-collection container to validate and consume.
§Returns

A V1 DTO preserving the input type and shape.

§Errors

Returns ValueWireEncodeError::NonFiniteFloat for a non-finite float, ValueWireEncodeError::BigDecimalScaleTooLarge for a decimal whose exponent is outside V1’s supported range, or ValueWireEncodeError::InstantYearOutOfRange for an instant outside the supported UTC year range. With the json feature, returns JsonNumberNotRoundTrippable if a runtime JSON number in either the scalar or collection shape, including a nested number, cannot preserve its serde_json::Number identity under the V1 number model.

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

Returns the owned value unchanged as the default.

§Returns

The input value, moved without cloning.

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.