Type Alias ort::DynValue

source ·
pub type DynValue = Value<DynValueTypeMarker>;
Expand description

A dynamic value, which could be a Tensor, Sequence, or Map.

To attempt to convert a dynamic value to a strongly typed value, use DynValue::downcast. You can also attempt to extract data from dynamic values directly using try_extract_* methods; see Value for more information.

Aliased Type§

struct DynValue { /* private fields */ }

Trait Implementations§

source§

impl From<Value<DynTensorValueType>> for DynValue

source§

fn from(value: Value<DynTensorValueType>) -> Self

Converts to this type from the input type.
source§

impl<T: IntoTensorElementType + Debug> From<Value<TensorValueType<T>>> for DynValue

source§

fn from(value: Value<TensorValueType<T>>) -> Self

Converts to this type from the input type.
source§

impl<'i, 'v, T: IntoTensorElementType + Debug + Clone + 'static, D: Dimension + 'static> TryFrom<&'i ArrayBase<CowRepr<'v, T>, D>> for DynValue
where 'i: 'v,

Available on crate feature ndarray only.
§

type Error = Error

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

fn try_from(arr: &'i CowArray<'v, T, D>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<T: IntoTensorElementType + Debug + Clone + 'static, D: Dimension + 'static> TryFrom<&mut ArrayBase<OwnedArcRepr<T>, D>> for DynValue

Available on crate feature ndarray only.
§

type Error = Error

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

fn try_from(value: &mut ArcArray<T, D>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<T: IntoTensorElementType + Debug + Clone + 'static, I: ToDimensions> TryFrom<(I, &[T])> for DynValue

§

type Error = Error

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

fn try_from(value: (I, &[T])) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<T: IntoTensorElementType + Debug + Clone + 'static, I: ToDimensions> TryFrom<(I, Arc<Box<[T]>>)> for DynValue

§

type Error = Error

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

fn try_from(value: (I, Arc<Box<[T]>>)) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<T: IntoTensorElementType + Debug + Clone + 'static, I: ToDimensions> TryFrom<(I, Box<[T]>)> for DynValue

§

type Error = Error

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

fn try_from(value: (I, Box<[T]>)) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<T: IntoTensorElementType + Debug + Clone + 'static, I: ToDimensions> TryFrom<(I, Vec<T>)> for DynValue

§

type Error = Error

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

fn try_from(value: (I, Vec<T>)) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<T: IntoTensorElementType + Debug + Clone + 'static, D: Dimension + 'static> TryFrom<ArrayBase<OwnedRepr<T>, D>> for DynValue

Available on crate feature ndarray only.
§

type Error = Error

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

fn try_from(value: Array<T, D>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<'v, T: IntoTensorElementType + Debug + Clone + 'static, D: Dimension + 'static> TryFrom<ArrayBase<ViewRepr<&'v T>, D>> for DynValue

Available on crate feature ndarray only.
§

type Error = Error

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

fn try_from(arr: ArrayView<'v, T, D>) -> Result<Self, Self::Error>

Performs the conversion.