isl-rs 0.3.1

Rust bindings for Integer Set Library
Documentation
// Automatically generated by isl_bindings_generator.
// LICENSE: MIT

pub use super::Error;

/// Returns errors caught in libisl values as defined in libisl.
#[derive(Debug)]
pub struct LibISLError {
    kind: Error,
    msg: String,
}

impl LibISLError {
    pub fn new<M: Into<String>>(kind: Error, msg: M) -> Self {
        Self { kind: kind,
               msg: msg.into() }
    }
}

impl std::fmt::Display for LibISLError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        write!(f, "[{:?}] {}", self.kind, self.msg)
    }
}

impl std::error::Error for LibISLError {}