use crate::{
Def, Facet, Repr, Shape, ShapeBuilder, StructKind, StructType, Type, TypeOpsDirect, UserType,
VTableDirect, type_ops_direct, vtable_direct,
};
static UNIT_TYPE_OPS: TypeOpsDirect = type_ops_direct!(() => Default);
unsafe impl Facet<'_> for () {
const SHAPE: &'static Shape = &const {
const VTABLE: VTableDirect = vtable_direct!(() =>
Debug,
Hash,
PartialEq,
PartialOrd,
Ord,
);
ShapeBuilder::for_sized::<()>("()")
.ty(Type::User(UserType::Struct(StructType {
repr: Repr::default(),
kind: StructKind::Tuple,
fields: &[],
})))
.def(Def::Scalar)
.vtable_direct(&VTABLE)
.type_ops_direct(&UNIT_TYPE_OPS)
.eq()
.copy()
.send()
.sync()
.build()
};
}