aoc-toolkit 0.1.0-alpha.1

A toolkit for solving Advent of Code problems
Documentation
use std::io;
use std::path::PathBuf;

use thiserror::Error;

#[derive(Debug, Error)]
pub enum ScaffoldError {
    #[error("Invalid relative path: {0:?}")]
    InvalidPath(PathBuf),

    #[error("File already exists: {0:?}")]
    FileExists(PathBuf),

    #[error("Conflicting planned path: {0:?}")]
    PathConflict(PathBuf),

    #[error("Expected a directory: {0:?}")]
    NotDirectory(PathBuf),

    #[error("Symbolic links are not supported: {0:?}")]
    SymbolicLink(PathBuf),

    #[error("Filesystem operation failed for {path:?}: {source}")]
    Io {
        path: PathBuf,
        #[source]
        source: io::Error,
    },

    #[error(transparent)]
    Template(#[from] minijinja::Error),
}