use std::fmt::Debug;
use std::marker::PhantomData;
pub use ::get_struct_name::GetStructNameT; pub use ::get_struct_name_derive::GetStructNameD; use fbthrift::adapter::ThriftAdapter;
pub struct WrapperAdapter<T>(PhantomData<T>);
#[derive(Clone, Debug, PartialEq)]
pub struct Wrapper<T: Clone + Debug + PartialEq + Sync + Send>(pub T);
impl<T> ThriftAdapter for WrapperAdapter<T>
where
T: Clone + Debug + PartialEq + Sync + Send,
{
type StandardType = T;
type AdaptedType = Wrapper<T>;
type Error = std::convert::Infallible;
fn from_thrift(value: Self::StandardType) -> Result<Self::AdaptedType, Self::Error> {
Ok(Wrapper(value))
}
fn to_thrift(value: &Self::AdaptedType) -> Self::StandardType {
value.0.clone()
}
}