Skip to main content

parasail_rs/aligner/
error.rs

1use derive_more::From;
2use std::ffi::NulError;
3use std::fmt::{Display, Formatter};
4
5#[derive(Debug, From)]
6pub enum Error {
7    #[from]
8    InteriorNulByte(NulError),
9    NoBandwidth,
10    #[from]
11    Alignment(crate::alignment::Error),
12}
13
14impl Display for Error {
15    fn fmt(&self, f: &mut Formatter) -> std::result::Result<(), std::fmt::Error> {
16        write!(f, "{self:?}")
17    }
18}
19
20impl std::error::Error for Error {}