Skip to main content

tuwunel_core/error/
serde.rs

1use std::fmt::Display;
2
3use crate::Error;
4
5impl serde_core::de::Error for Error {
6	fn custom<T: Display + ToString>(msg: T) -> Self { Self::SerdeDe(msg.to_string().into()) }
7}
8
9impl serde_core::ser::Error for Error {
10	fn custom<T: Display + ToString>(msg: T) -> Self { Self::SerdeSer(msg.to_string().into()) }
11}