Trait ort::tensor::IntoTensorElementDataType
source · pub trait IntoTensorElementDataType {
// Required methods
fn tensor_element_data_type() -> TensorElementDataType;
fn try_utf8_bytes(&self) -> Option<&[u8]>;
}
Expand description
Trait used to map Rust types (for example f32
) to ONNX tensor element data types (for example Float
).
Required Methods§
sourcefn tensor_element_data_type() -> TensorElementDataType
fn tensor_element_data_type() -> TensorElementDataType
Returns the ONNX tensor element data type corresponding to the given Rust type.
sourcefn try_utf8_bytes(&self) -> Option<&[u8]>
fn try_utf8_bytes(&self) -> Option<&[u8]>
If the type is String
, returns Some
with UTF-8 contents, else None
.
Object Safety§
This trait is not object safe.