use std; use std::fmt::Display; use serde::{de, ser}; use crate::bipack_source::BipackError; pub type Result = std::result::Result; impl ser::Error for BipackError { fn custom(msg: T) -> Self { BipackError::Message(msg.to_string()) } } impl de::Error for BipackError { fn custom(msg: T) -> Self { BipackError::Message(msg.to_string()) } }