ines-core 0.0.2

Rust bundler/framework for website with WebComponent
Documentation
use crate::project::builder;

pub type Result<Ok> = core::result::Result<Ok, Error>;

#[derive(Debug)]
pub enum Error {
    Io(std::io::Error),
    InvalidProject(String),
    ParseConfig(toml::de::Error),
    SerializeConfig(toml::ser::Error),
    Builder(builder::error::Error),
}

impl From<std::io::Error> for Error {
    fn from(io_error: std::io::Error) -> Self {
        Self::Io(io_error)
    }
}

impl From<toml::de::Error> for Error {
    fn from(toml_error: toml::de::Error) -> Self {
        Self::ParseConfig(toml_error)
    }
}

impl From<toml::ser::Error> for Error {
    fn from(toml_error: toml::ser::Error) -> Self {
        Self::SerializeConfig(toml_error)
    }
}

impl From<builder::error::Error> for Error {
    fn from(value: builder::error::Error) -> Self {
        Self::Builder(value)
    }
}