pub( crate ) mod private
{
use core::fmt;
use core::hash::Hash;
use core::cmp::{ PartialEq, Eq };
pub trait IdentityInterface
where
Self :
'static +
Copy +
Hash +
fmt::Debug +
PartialEq +
Eq +
Hash +
{
}
impl< T > IdentityInterface for T
where
T :
'static +
Copy +
Hash +
fmt::Debug +
PartialEq +
Eq +
Hash +
,
{
}
pub trait IdentityGenerableInterface
where
Self : IdentityInterface + Default,
{
fn next( &self ) -> Self;
fn first() -> Self
{
Default::default()
}
fn is_valid( &self ) -> bool;
}
pub trait HasId
{
type Id : IdentityInterface;
fn id( &self ) -> Self::Id;
}
}
pub mod protected
{
pub use super::orphan::*;
}
pub use protected::*;
pub mod orphan
{
pub use super::exposed::*;
}
pub mod exposed
{
pub use super::prelude::*;
}
pub mod prelude
{
pub use super::private::
{
IdentityInterface,
IdentityGenerableInterface,
HasId,
};
}