serde_typeinfo/
error.rs

1use serde::ser;
2use std::fmt::{self, Display};
3
4#[derive(Debug)]
5pub struct Error {}
6
7impl ser::Error for Error {
8    fn custom<T: Display>(_msg: T) -> Self {
9        Self {}
10    }
11}
12
13impl Display for Error {
14    fn fmt(&self, _formatter: &mut fmt::Formatter) -> fmt::Result {
15        Ok(())
16    }
17}
18
19impl std::error::Error for Error {}
20
21pub type Result<T> = ::std::result::Result<T, Error>;