silkgen 0.4.0

Generate KiCad silkscreen art from PNGs.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use std::fmt::{self, Debug, Display};

pub type Error = Box<dyn std::error::Error + Send + Sync + 'static>;

pub struct DisplayError(Error);

impl Debug for DisplayError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        Display::fmt(&self.0, f)
    }
}

impl<T: Into<Error>> From<T> for DisplayError {
    fn from(display: T) -> Self {
        DisplayError(display.into())
    }
}