unique_pointer/
traits.rs

1use std::fmt::Debug;
2use std::hash::Hash;
3
4/// The [`crate::Pointee`] trait serves as a contract of sorts to ensure
5/// that types used in [`crate::UniquePointer`] implement
6/// Debug, because of it being considered experimental.
7
8#[cfg(not(feature="allow-no-debug"))]
9pub trait Pointee: Debug {}
10#[cfg(feature="allow-no-debug")]
11pub trait Pointee {}
12#[cfg(not(feature="allow-no-debug"))]
13impl<T: Debug> Pointee for T {}
14#[cfg(feature="allow-no-debug")]
15impl<T> Pointee for T {}
16// pub trait Pointee: Sized + Debug {}
17// impl<T: Sized + Debug> Pointee for T {}