use std::{error::Error, fmt::Display}; #[derive(Debug, PartialEq, Eq)] pub struct ParseMatrixError; impl Display for ParseMatrixError { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "Matrix parsing error") } } impl Error for ParseMatrixError {} #[derive(Debug)] pub struct MatrixSetValueError; impl Error for MatrixSetValueError {} impl Display for MatrixSetValueError { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "Matrix set value err") } }