pub trait TensorImageDst {
// Required methods
fn tensor(&self) -> &Tensor<u8>;
fn tensor_mut(&mut self) -> &mut Tensor<u8>;
fn fourcc(&self) -> FourCharCode;
fn is_planar(&self) -> bool;
fn width(&self) -> usize;
fn height(&self) -> usize;
fn channels(&self) -> usize;
fn row_stride(&self) -> usize;
fn buffer_identity(&self) -> &BufferIdentity;
}Expand description
Trait for types that can be used as destination images for conversion.
This trait abstracts over the difference between owned (TensorImage) and
borrowed (TensorImageRef) image buffers, enabling the same conversion code
to work with both.
Required Methods§
Sourcefn tensor_mut(&mut self) -> &mut Tensor<u8>
fn tensor_mut(&mut self) -> &mut Tensor<u8>
Returns a mutable reference to the underlying tensor.
Sourcefn fourcc(&self) -> FourCharCode
fn fourcc(&self) -> FourCharCode
Returns the FourCC code representing the image format.
Sourcefn row_stride(&self) -> usize
fn row_stride(&self) -> usize
Returns the row stride in bytes.
Sourcefn buffer_identity(&self) -> &BufferIdentity
fn buffer_identity(&self) -> &BufferIdentity
Returns the buffer identity of the underlying tensor.