pub unsafe trait TensorLayoutMut: TensorLayout {
// Required method
fn tensor_layout_mut(&mut self) -> RawLayout;
}Expand description
A diffsol vector that a TensorViewMut can show, so that a C callback can write its values
with no copy. The layout is [n, nbatch], the same as TensorLayout::tensor_layout.
§Safety
As for TensorLayout. TensorLayoutMut::tensor_layout_mut must give the same layout as TensorLayout::tensor_layout, with a pointer that allows writes to each value of the layout while the value is mutably borrowed.
Required Methods§
Sourcefn tensor_layout_mut(&mut self) -> RawLayout
fn tensor_layout_mut(&mut self) -> RawLayout
The layout of the data, with a pointer that allows writes.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".