dd1f4b483e
Both of these modules are doc(hidden) and commented "Not public API", but incorrect downstream code sometimes still references them. Naming the module __private will make it more likely to be noticed in code review.
53 lines
1.9 KiB
Rust
53 lines
1.9 KiB
Rust
use serde::{Deserialize, Serialize};
|
|
struct NamedUnit;
|
|
#[doc(hidden)]
|
|
#[allow(non_upper_case_globals, unused_attributes, unused_qualifications)]
|
|
const _: () = {
|
|
#[allow(rust_2018_idioms, clippy::useless_attribute)]
|
|
extern crate serde as _serde;
|
|
#[automatically_derived]
|
|
impl _serde::Serialize for NamedUnit {
|
|
fn serialize<__S>(
|
|
&self,
|
|
__serializer: __S,
|
|
) -> _serde::__private::Result<__S::Ok, __S::Error>
|
|
where
|
|
__S: _serde::Serializer,
|
|
{
|
|
_serde::Serializer::serialize_unit_struct(__serializer, "NamedUnit")
|
|
}
|
|
}
|
|
};
|
|
#[doc(hidden)]
|
|
#[allow(non_upper_case_globals, unused_attributes, unused_qualifications)]
|
|
const _: () = {
|
|
#[allow(rust_2018_idioms, clippy::useless_attribute)]
|
|
extern crate serde as _serde;
|
|
#[automatically_derived]
|
|
impl<'de> _serde::Deserialize<'de> for NamedUnit {
|
|
fn deserialize<__D>(__deserializer: __D) -> _serde::__private::Result<Self, __D::Error>
|
|
where
|
|
__D: _serde::Deserializer<'de>,
|
|
{
|
|
struct __Visitor;
|
|
impl<'de> _serde::de::Visitor<'de> for __Visitor {
|
|
type Value = NamedUnit;
|
|
fn expecting(
|
|
&self,
|
|
__formatter: &mut _serde::__private::Formatter,
|
|
) -> _serde::__private::fmt::Result {
|
|
_serde::__private::Formatter::write_str(__formatter, "unit struct NamedUnit")
|
|
}
|
|
#[inline]
|
|
fn visit_unit<__E>(self) -> _serde::__private::Result<Self::Value, __E>
|
|
where
|
|
__E: _serde::de::Error,
|
|
{
|
|
_serde::__private::Ok(NamedUnit)
|
|
}
|
|
}
|
|
_serde::Deserializer::deserialize_unit_struct(__deserializer, "NamedUnit", __Visitor)
|
|
}
|
|
}
|
|
};
|