標準ライブラリに std::error::Error トレイトが用意されているので,それを利用します. ... #[derive(Debug)] enum MyError { HogeError(u8), ...
確定! 回上一頁