pub trait PreparedInputInspector<Tensor> {
// Required methods
fn identity(
&self,
tensor: &Tensor,
) -> Result<InputTensorIdentity, PreparedInputError>;
fn i32_values(&self, tensor: &Tensor) -> Result<Vec<i32>, CapabilityError>;
fn bool_values(&self, tensor: &Tensor) -> Result<Vec<bool>, CapabilityError>;
}Expand description
Mechanism for describing native prepared tensors and reading bounded metadata.
Architecture admission owns which metadata values are semantically relevant. Implementations expose only tensor identity and evaluation of the small integer or Boolean arrays requested by that admission logic.
Required Methods§
Sourcefn identity(
&self,
tensor: &Tensor,
) -> Result<InputTensorIdentity, PreparedInputError>
fn identity( &self, tensor: &Tensor, ) -> Result<InputTensorIdentity, PreparedInputError>
Returns the portable identity of a native tensor.
Sourcefn i32_values(&self, tensor: &Tensor) -> Result<Vec<i32>, CapabilityError>
fn i32_values(&self, tensor: &Tensor) -> Result<Vec<i32>, CapabilityError>
Reads an evaluated signed-integer metadata tensor in row-major order.
Sourcefn bool_values(&self, tensor: &Tensor) -> Result<Vec<bool>, CapabilityError>
fn bool_values(&self, tensor: &Tensor) -> Result<Vec<bool>, CapabilityError>
Reads an evaluated Boolean metadata tensor in row-major order.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".