macro_rules! errcast_panic {
($result:expr) => { ... };
($result:expr, $kind:ty$(, $format_str:expr$(, $val:expr )* )?) => { ... };
}Expand description
Any type of error can be converted into our Master Error. (and unwraping)
And then panic!
ⓘ
// example
// <Unwraped Ok> = errcast!(<Any Result>, <Master Err>, <Optional,..>);
let num_read = errcast_panic!(file.read(&mut buf), err::ReadErr, "this is {} data.", "meta");also can
ⓘ
let num_read = errcast_panic!(file.read(&mut buf));