Trait onnxruntime::Utf8Data[][src]

pub trait Utf8Data {
    fn utf8_bytes(&self) -> &[u8];
}
Expand description

Adapter for common Rust string types to Onnx strings.

It should be easy to use both String and &str as TensorElementDataType::String data, but we can’t define an automatic implementation for anything that implements AsRef<str> as it would conflict with the implementations of TypeToTensorElementDataType for primitive numeric types (which might implement AsRef<str> at some point in the future).

Required methods

Returns the utf8 contents.

Implementations on Foreign Types

Implementors