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.
Collection(MultiValues)
A homogeneous typed collection.
Tuple Fields
0: MultiValuesStored homogeneous collection.
Implementations§
Source§impl ValueContainer
impl ValueContainer
Sourcepub const fn new_unset_scalar(data_type: DataType) -> Self
pub const fn new_unset_scalar(data_type: DataType) -> Self
Sourcepub const fn new_unset_collection(data_type: DataType) -> Self
pub const fn new_unset_collection(data_type: DataType) -> Self
Sourcepub fn get_first_ref<'a, T: ?Sized>(&'a self) -> ValueResult<&'a T>
pub fn get_first_ref<'a, T: ?Sized>(&'a self) -> ValueResult<&'a T>
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(_))));Sourcepub 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>,
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(_))));Sourcepub fn data_type(&self) -> DataType
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.
Sourcepub const fn as_scalar(&self) -> Option<&Value>
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.
Sourcepub const fn is_collection(&self) -> bool
pub const fn is_collection(&self) -> bool
Sourcepub const fn as_collection(&self) -> Option<&MultiValues>
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.
Sourcepub fn is_unset(&self) -> bool
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.
Sourcepub fn len(&self) -> usize
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.
Sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Tests whether this container represents no concrete values.
§Returns
true for unset storage or a concrete empty collection.
Sourcepub fn get_first<T>(&self) -> ValueResult<T>where
T: StrictValueRead,
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.
Sourcepub fn get_list<T>(&self) -> ValueResult<Vec<T>>where
T: StrictValueRead,
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.
Sourcepub fn to_first<T>(&self) -> ValueResult<T>where
T: DataConversionTarget,
Available on crate feature converter only.
pub fn to_first<T>(&self) -> ValueResult<T>where
T: DataConversionTarget,
converter only.Sourcepub fn to_first_with<T>(
&self,
policy: &ConversionPolicy,
limits: &ConversionLimits,
) -> ValueResult<T>where
T: DataConversionTarget,
Available on crate feature converter only.
pub fn to_first_with<T>(
&self,
policy: &ConversionPolicy,
limits: &ConversionLimits,
) -> ValueResult<T>where
T: DataConversionTarget,
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.
Sourcepub fn to_first_in<T>(
&self,
session: &mut ConversionSession<'_>,
) -> ValueResult<T>where
T: DataConversionTarget,
Available on crate feature converter only.
pub fn to_first_in<T>(
&self,
session: &mut ConversionSession<'_>,
) -> ValueResult<T>where
T: DataConversionTarget,
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.
Sourcepub fn to_list<T>(&self) -> ValueResult<Vec<T>>where
T: DataConversionTarget,
Available on crate feature converter only.
pub fn to_list<T>(&self) -> ValueResult<Vec<T>>where
T: DataConversionTarget,
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.
Sourcepub fn to_list_with<T>(
&self,
policy: &ConversionPolicy,
limits: &ConversionLimits,
) -> ValueResult<Vec<T>>where
T: DataConversionTarget,
Available on crate feature converter only.
pub fn to_list_with<T>(
&self,
policy: &ConversionPolicy,
limits: &ConversionLimits,
) -> ValueResult<Vec<T>>where
T: DataConversionTarget,
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.
Sourcepub fn to_list_in<T>(
&self,
session: &mut ConversionSession<'_>,
) -> ValueResult<Vec<T>>where
T: DataConversionTarget,
Available on crate feature converter only.
pub fn to_list_in<T>(
&self,
session: &mut ConversionSession<'_>,
) -> ValueResult<Vec<T>>where
T: DataConversionTarget,
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.
Sourcepub fn into_scalar(self) -> Result<Value, Self>
pub fn into_scalar(self) -> Result<Value, Self>
Sourcepub fn into_collection(self) -> Result<MultiValues, Self>
pub fn into_collection(self) -> Result<MultiValues, Self>
Sourcepub fn set<S>(&mut self, value: S)where
S: Into<Self>,
pub fn set<S>(&mut self, value: S)where
S: Into<Self>,
Replaces this container, including its shape, from a supported input.
§Type Parameters
S- Input type convertible intoValueContainer.
§Parameters
value- New scalar or collection value.
Sourcepub fn add<S>(&mut self, values: S) -> ValueResult<()>where
S: Into<Self>,
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
S- Input type convertible intoValueContainer.
§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§impl ValueContainer
impl ValueContainer
Sourcepub fn to_json_value(&self) -> ValueResult<JsonValue>
Available on crate features converter and json only.
pub fn to_json_value(&self) -> ValueResult<JsonValue>
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.
Sourcepub fn to_json_value_with(
&self,
policy: &ConversionPolicy,
limits: &ConversionLimits,
) -> ValueResult<JsonValue>
Available on crate features converter and json only.
pub fn to_json_value_with( &self, policy: &ConversionPolicy, limits: &ConversionLimits, ) -> ValueResult<JsonValue>
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
impl Clone for ValueContainer
Source§impl Debug for ValueContainer
impl Debug for ValueContainer
impl Eq for ValueContainer
Source§impl<'a, 'b> From<&'a Vec<&'b str>> for ValueContainer
impl<'a, 'b> From<&'a Vec<&'b str>> for ValueContainer
Source§impl<'a, 'b, const N: usize> From<&'a [&'b str; N]> for ValueContainer
impl<'a, 'b, const N: usize> From<&'a [&'b str; N]> for ValueContainer
Source§fn from(values: &'a [&'b str; N]) -> Self
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
impl<'a, 'b> From<&'a [&'b str]> for ValueContainer
Source§impl From<&Vec<BigDecimal>> for ValueContainer
Available on crate feature big-decimal only.
impl From<&Vec<BigDecimal>> for ValueContainer
big-decimal only.Source§fn from(values: &Vec<BigDecimal>) -> Self
fn from(values: &Vec<BigDecimal>) -> Self
Source§impl From<&Vec<BigInt>> for ValueContainer
Available on crate feature big-integer only.
impl From<&Vec<BigInt>> for ValueContainer
big-integer only.Source§impl From<&Vec<DateTime<Utc>>> for ValueContainer
Available on crate feature chrono only.
impl From<&Vec<DateTime<Utc>>> for ValueContainer
chrono only.Source§impl From<&Vec<HashMap<String, String>>> for ValueContainer
impl From<&Vec<HashMap<String, String>>> for ValueContainer
Source§impl From<&Vec<NaiveDate>> for ValueContainer
Available on crate feature chrono only.
impl From<&Vec<NaiveDate>> for ValueContainer
chrono only.Source§impl From<&Vec<NaiveDateTime>> for ValueContainer
Available on crate feature chrono only.
impl From<&Vec<NaiveDateTime>> for ValueContainer
chrono only.Source§fn from(values: &Vec<NaiveDateTime>) -> Self
fn from(values: &Vec<NaiveDateTime>) -> Self
Source§impl From<&Vec<NaiveTime>> for ValueContainer
Available on crate feature chrono only.
impl From<&Vec<NaiveTime>> for ValueContainer
chrono only.Source§impl From<&Vec<Url>> for ValueContainer
Available on crate feature url only.
impl From<&Vec<Url>> for ValueContainer
url only.Source§impl From<&Vec<Value>> for ValueContainer
Available on crate feature json only.
impl From<&Vec<Value>> for ValueContainer
json only.Source§impl<const N: usize> From<&[BigDecimal; N]> for ValueContainer
Available on crate feature big-decimal only.
impl<const N: usize> From<&[BigDecimal; N]> for ValueContainer
big-decimal only.Source§fn from(values: &[BigDecimal; N]) -> Self
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.
impl From<&[BigDecimal]> for ValueContainer
big-decimal only.Source§fn from(values: &[BigDecimal]) -> Self
fn from(values: &[BigDecimal]) -> Self
Source§impl<const N: usize> From<&[BigInt; N]> for ValueContainer
Available on crate feature big-integer only.
impl<const N: usize> From<&[BigInt; N]> for ValueContainer
big-integer only.Source§fn from(values: &[BigInt; N]) -> Self
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.
impl From<&[BigInt]> for ValueContainer
big-integer only.Source§impl<const N: usize> From<&[DateTime<Utc>; N]> for ValueContainer
Available on crate feature chrono only.
impl<const N: usize> From<&[DateTime<Utc>; N]> for ValueContainer
chrono only.Source§fn from(values: &[DateTime<Utc>; N]) -> Self
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.
impl From<&[DateTime<Utc>]> for ValueContainer
chrono only.Source§impl<const N: usize> From<&[Duration; N]> for ValueContainer
impl<const N: usize> From<&[Duration; N]> for ValueContainer
Source§fn from(values: &[Duration; N]) -> Self
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<const N: usize> From<&[HashMap<String, String>; N]> for ValueContainer
impl<const N: usize> From<&[HashMap<String, String>; N]> for ValueContainer
Source§fn from(values: &[HashMap<String, String>; N]) -> Self
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
impl From<&[HashMap<String, String>]> for ValueContainer
Source§impl<const N: usize> From<&[NaiveDate; N]> for ValueContainer
Available on crate feature chrono only.
impl<const N: usize> From<&[NaiveDate; N]> for ValueContainer
chrono only.Source§fn from(values: &[NaiveDate; N]) -> Self
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.
impl<const N: usize> From<&[NaiveDateTime; N]> for ValueContainer
chrono only.Source§fn from(values: &[NaiveDateTime; N]) -> Self
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.
impl From<&[NaiveDateTime]> for ValueContainer
chrono only.Source§fn from(values: &[NaiveDateTime]) -> Self
fn from(values: &[NaiveDateTime]) -> Self
Source§impl From<&[NaiveDate]> for ValueContainer
Available on crate feature chrono only.
impl From<&[NaiveDate]> for ValueContainer
chrono only.Source§impl<const N: usize> From<&[NaiveTime; N]> for ValueContainer
Available on crate feature chrono only.
impl<const N: usize> From<&[NaiveTime; N]> for ValueContainer
chrono only.Source§fn from(values: &[NaiveTime; N]) -> Self
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.
impl From<&[NaiveTime]> for ValueContainer
chrono only.Source§impl<const N: usize> From<&[String; N]> for ValueContainer
impl<const N: usize> From<&[String; N]> for ValueContainer
Source§fn from(values: &[String; N]) -> Self
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<const N: usize> From<&[Url; N]> for ValueContainer
Available on crate feature url only.
impl<const N: usize> From<&[Url; N]> for ValueContainer
url only.Source§fn from(values: &[Url; N]) -> Self
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.
impl From<&[Url]> for ValueContainer
url only.Source§impl<const N: usize> From<&[Value; N]> for ValueContainer
Available on crate feature json only.
impl<const N: usize> From<&[Value; N]> for ValueContainer
json only.Source§fn from(values: &[Value; N]) -> Self
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.
impl From<&[Value]> for ValueContainer
json only.Source§impl<const N: usize> From<&[bool; N]> for ValueContainer
impl<const N: usize> From<&[bool; N]> for ValueContainer
Source§fn from(values: &[bool; N]) -> Self
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<const N: usize> From<&[char; N]> for ValueContainer
impl<const N: usize> From<&[char; N]> for ValueContainer
Source§fn from(values: &[char; N]) -> Self
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<const N: usize> From<&[f32; N]> for ValueContainer
impl<const N: usize> From<&[f32; N]> for ValueContainer
Source§fn from(values: &[f32; N]) -> Self
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<const N: usize> From<&[f64; N]> for ValueContainer
impl<const N: usize> From<&[f64; N]> for ValueContainer
Source§fn from(values: &[f64; N]) -> Self
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<const N: usize> From<&[i8; N]> for ValueContainer
impl<const N: usize> From<&[i8; N]> for ValueContainer
Source§fn from(values: &[i8; N]) -> Self
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<const N: usize> From<&[i16; N]> for ValueContainer
impl<const N: usize> From<&[i16; N]> for ValueContainer
Source§fn from(values: &[i16; N]) -> Self
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<const N: usize> From<&[i32; N]> for ValueContainer
impl<const N: usize> From<&[i32; N]> for ValueContainer
Source§fn from(values: &[i32; N]) -> Self
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<const N: usize> From<&[i64; N]> for ValueContainer
impl<const N: usize> From<&[i64; N]> for ValueContainer
Source§fn from(values: &[i64; N]) -> Self
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<const N: usize> From<&[i128; N]> for ValueContainer
impl<const N: usize> From<&[i128; N]> for ValueContainer
Source§fn from(values: &[i128; N]) -> Self
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<const N: usize> From<&[u8; N]> for ValueContainer
impl<const N: usize> From<&[u8; N]> for ValueContainer
Source§fn from(values: &[u8; N]) -> Self
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<const N: usize> From<&[u16; N]> for ValueContainer
impl<const N: usize> From<&[u16; N]> for ValueContainer
Source§fn from(values: &[u16; N]) -> Self
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<const N: usize> From<&[u32; N]> for ValueContainer
impl<const N: usize> From<&[u32; N]> for ValueContainer
Source§fn from(values: &[u32; N]) -> Self
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<const N: usize> From<&[u64; N]> for ValueContainer
impl<const N: usize> From<&[u64; N]> for ValueContainer
Source§fn from(values: &[u64; N]) -> Self
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<const N: usize> From<&[u128; N]> for ValueContainer
impl<const N: usize> From<&[u128; N]> for ValueContainer
Source§fn from(values: &[u128; N]) -> Self
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<&str> for ValueContainer
impl From<&str> for ValueContainer
Source§impl From<BigDecimal> for ValueContainer
Available on crate feature big-decimal only.
impl From<BigDecimal> for ValueContainer
big-decimal only.Source§impl From<BigInt> for ValueContainer
Available on crate feature big-integer only.
impl From<BigInt> for ValueContainer
big-integer only.Source§impl From<Duration> for ValueContainer
impl From<Duration> for ValueContainer
Source§impl From<MultiValues> for ValueContainer
impl From<MultiValues> for ValueContainer
Source§impl From<NaiveDate> for ValueContainer
Available on crate feature chrono only.
impl From<NaiveDate> for ValueContainer
chrono only.Source§impl From<NaiveDateTime> for ValueContainer
Available on crate feature chrono only.
impl From<NaiveDateTime> for ValueContainer
chrono only.Source§impl From<NaiveTime> for ValueContainer
Available on crate feature chrono only.
impl From<NaiveTime> for ValueContainer
chrono only.Source§impl From<String> for ValueContainer
impl From<String> for ValueContainer
Source§impl From<Url> for ValueContainer
Available on crate feature url only.
impl From<Url> for ValueContainer
url only.Source§impl From<Value> for ValueContainer
Available on crate feature json only.
impl From<Value> for ValueContainer
json only.Source§impl From<Value> for ValueContainer
impl From<Value> for ValueContainer
Source§impl From<ValueWirePayloadV1> for ValueContainer
impl From<ValueWirePayloadV1> for ValueContainer
Source§impl From<ValueWireV1> for ValueContainer
impl From<ValueWireV1> for ValueContainer
Source§impl From<Vec<BigDecimal>> for ValueContainer
Available on crate feature big-decimal only.
impl From<Vec<BigDecimal>> for ValueContainer
big-decimal only.Source§fn from(values: Vec<BigDecimal>) -> Self
fn from(values: Vec<BigDecimal>) -> Self
Source§impl From<Vec<BigInt>> for ValueContainer
Available on crate feature big-integer only.
impl From<Vec<BigInt>> for ValueContainer
big-integer only.Source§impl From<Vec<DateTime<Utc>>> for ValueContainer
Available on crate feature chrono only.
impl From<Vec<DateTime<Utc>>> for ValueContainer
chrono only.Source§impl From<Vec<HashMap<String, String>>> for ValueContainer
impl From<Vec<HashMap<String, String>>> for ValueContainer
Source§impl From<Vec<NaiveDate>> for ValueContainer
Available on crate feature chrono only.
impl From<Vec<NaiveDate>> for ValueContainer
chrono only.Source§impl From<Vec<NaiveDateTime>> for ValueContainer
Available on crate feature chrono only.
impl From<Vec<NaiveDateTime>> for ValueContainer
chrono only.Source§fn from(values: Vec<NaiveDateTime>) -> Self
fn from(values: Vec<NaiveDateTime>) -> Self
Source§impl From<Vec<NaiveTime>> for ValueContainer
Available on crate feature chrono only.
impl From<Vec<NaiveTime>> for ValueContainer
chrono only.Source§impl From<Vec<Url>> for ValueContainer
Available on crate feature url only.
impl From<Vec<Url>> for ValueContainer
url only.Source§impl From<Vec<Value>> for ValueContainer
Available on crate feature json only.
impl From<Vec<Value>> for ValueContainer
json only.Source§impl<'a, const N: usize> From<[&'a str; N]> for ValueContainer
impl<'a, const N: usize> From<[&'a str; N]> for ValueContainer
Source§fn from(values: [&'a str; N]) -> Self
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.
impl<const N: usize> From<[BigDecimal; N]> for ValueContainer
big-decimal only.Source§fn from(values: [BigDecimal; N]) -> Self
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.
impl<const N: usize> From<[BigInt; N]> for ValueContainer
big-integer only.Source§fn from(values: [BigInt; N]) -> Self
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.
impl<const N: usize> From<[DateTime<Utc>; N]> for ValueContainer
chrono only.Source§fn from(values: [DateTime<Utc>; N]) -> Self
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
impl<const N: usize> From<[Duration; N]> for ValueContainer
Source§fn from(values: [Duration; N]) -> Self
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
impl<const N: usize> From<[HashMap<String, String>; N]> for ValueContainer
Source§fn from(values: [HashMap<String, String>; N]) -> Self
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.
impl<const N: usize> From<[NaiveDate; N]> for ValueContainer
chrono only.Source§fn from(values: [NaiveDate; N]) -> Self
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.
impl<const N: usize> From<[NaiveDateTime; N]> for ValueContainer
chrono only.Source§fn from(values: [NaiveDateTime; N]) -> Self
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.
impl<const N: usize> From<[NaiveTime; N]> for ValueContainer
chrono only.Source§fn from(values: [NaiveTime; N]) -> Self
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
impl<const N: usize> From<[String; N]> for ValueContainer
Source§fn from(values: [String; N]) -> Self
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.
impl<const N: usize> From<[Url; N]> for ValueContainer
url only.Source§fn from(values: [Url; N]) -> Self
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.
impl<const N: usize> From<[Value; N]> for ValueContainer
json only.Source§fn from(values: [Value; N]) -> Self
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
impl<const N: usize> From<[bool; N]> for ValueContainer
Source§fn from(values: [bool; N]) -> Self
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
impl<const N: usize> From<[char; N]> for ValueContainer
Source§fn from(values: [char; N]) -> Self
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
impl<const N: usize> From<[f32; N]> for ValueContainer
Source§fn from(values: [f32; N]) -> Self
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
impl<const N: usize> From<[f64; N]> for ValueContainer
Source§fn from(values: [f64; N]) -> Self
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
impl<const N: usize> From<[i8; N]> for ValueContainer
Source§fn from(values: [i8; N]) -> Self
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
impl<const N: usize> From<[i16; N]> for ValueContainer
Source§fn from(values: [i16; N]) -> Self
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
impl<const N: usize> From<[i32; N]> for ValueContainer
Source§fn from(values: [i32; N]) -> Self
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
impl<const N: usize> From<[i64; N]> for ValueContainer
Source§fn from(values: [i64; N]) -> Self
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
impl<const N: usize> From<[i128; N]> for ValueContainer
Source§fn from(values: [i128; N]) -> Self
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
impl<const N: usize> From<[u8; N]> for ValueContainer
Source§fn from(values: [u8; N]) -> Self
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
impl<const N: usize> From<[u16; N]> for ValueContainer
Source§fn from(values: [u16; N]) -> Self
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
impl<const N: usize> From<[u32; N]> for ValueContainer
Source§fn from(values: [u32; N]) -> Self
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
impl<const N: usize> From<[u64; N]> for ValueContainer
Source§fn from(values: [u64; N]) -> Self
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
impl<const N: usize> From<[u128; N]> for ValueContainer
Source§fn from(values: [u128; N]) -> Self
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
impl From<bool> for ValueContainer
Source§impl From<char> for ValueContainer
impl From<char> for ValueContainer
Source§impl From<f32> for ValueContainer
impl From<f32> for ValueContainer
Source§impl From<f64> for ValueContainer
impl From<f64> for ValueContainer
Source§impl From<i8> for ValueContainer
impl From<i8> for ValueContainer
Source§impl From<i16> for ValueContainer
impl From<i16> for ValueContainer
Source§impl From<i32> for ValueContainer
impl From<i32> for ValueContainer
Source§impl From<i64> for ValueContainer
impl From<i64> for ValueContainer
Source§impl From<i128> for ValueContainer
impl From<i128> for ValueContainer
Source§impl From<u8> for ValueContainer
impl From<u8> for ValueContainer
Source§impl From<u16> for ValueContainer
impl From<u16> for ValueContainer
Source§impl From<u32> for ValueContainer
impl From<u32> for ValueContainer
Source§impl From<u64> for ValueContainer
impl From<u64> for ValueContainer
Source§impl From<u128> for ValueContainer
impl From<u128> for ValueContainer
Source§impl Hash for ValueContainer
impl Hash for ValueContainer
Source§impl PartialEq for ValueContainer
impl PartialEq for ValueContainer
Source§impl Redact for ValueContainer
Available on crate feature redact only.
impl Redact for ValueContainer
redact only.Source§fn write_redacted(&self, writer: &mut RedactionWriter<'_>)
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.
impl StructuralPartialEq for ValueContainer
Source§impl<'a> TryFrom<&'a ValueContainer> for ValueWirePayloadRefV1<'a>
impl<'a> TryFrom<&'a ValueContainer> for ValueWirePayloadRefV1<'a>
Source§type Error = ValueWireEncodeError
type Error = ValueWireEncodeError
V1 representation validation failure; the borrowed input is unchanged.
Source§fn try_from(value: &'a ValueContainer) -> Result<Self, Self::Error>
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>
impl<'a> TryFrom<&'a ValueContainer> for ValueWireRefV1<'a>
Source§type Error = ValueWireEncodeError
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>
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
impl TryFrom<ValueContainer> for ValueWirePayloadV1
Source§type Error = ValueWireEncodeError
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>
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
impl TryFrom<ValueContainer> for ValueWireV1
Source§type Error = ValueWireEncodeError
type Error = ValueWireEncodeError
Failure to represent the consumed runtime value under the V1 contract.
Source§fn try_from(value: ValueContainer) -> Result<Self, Self::Error>
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.