use serde::Deserialize;
use super::CollectionWireOwned;
use super::ScalarWireOwned;
use crate::ValueContainer;
#[derive(Deserialize)]
pub(in crate::value_wire) enum WireShapeOwned {
#[serde(rename = "scalar")]
Scalar(
ScalarWireOwned,
),
#[serde(rename = "collection")]
Collection(
CollectionWireOwned,
),
}
impl From<WireShapeOwned> for ValueContainer {
#[inline]
fn from(value: WireShapeOwned) -> Self {
match value {
WireShapeOwned::Scalar(value) => Self::Scalar(value.into()),
WireShapeOwned::Collection(values) => Self::Collection(values.into()),
}
}
}