fn cast<Source: Datum + crate::datum::TryInto<Target>, Target: Datum>(&self) -> TractResult<Tensor> {
        let data = self.cast_data::<Source, Target>()?;
        Ok(Tensor {
            null: self.null,
            dt: Target::datum_type(),
            shape: self.shape.clone(),
            data: vec_to_u8(data),
            alignment: Target::datum_type().alignment(),
        })
    }
/// Convert data to a tensor for a new DatumType.
Convert data to a tensor for a new DatumType.
Convert data to a tensor for a new DatumType .
fn cast<Source: Datum + crate::datum::TryInto<Target>, Target: Datum>(&self) -> TractResult<Tensor> {
        let data = self.cast_data::<Source, Target>()?;
        Ok(Tensor {
            null: self.null,
            dt: Target::datum_type(),
            shape: self.shape.clone(),
            data: vec_to_u8(data),
            alignment: Target::datum_type().alignment(),
        })
    }
fn cast < Source : Datum + crate :: datum :: TryInto < Target > , Target : Datum > ( & self ) -> TractResult < Tensor > { let data = self . cast_data :: < Source , Target > ( ) ? ; Ok ( Tensor { null : self . null , dt : Target :: datum_type ( ) , shape : self . shape . clone ( ) , data : vec_to_u8 ( data ) , alignment : Target :: datum_type ( ) . alignment ( ) , } ) }
Convert data to a tensor for a new DatumType.
Convert data to a tensor for a new DatumType .
&self
&self