mod private
{
use crate::prelude::*;
#[ derive( Debug, Copy, Clone ) ]
pub struct Edge< EdgeId = crate::IdentityWithInt, NodeId = crate::IdentityWithInt >
where
EdgeId : IdentityInterface,
NodeId : IdentityInterface,
{
pub in_node : NodeId,
pub out_node : NodeId,
pub id : EdgeId,
}
impl< EdgeId, NodeId > HasId
for Edge< EdgeId, NodeId >
where
EdgeId : IdentityInterface,
NodeId : IdentityInterface,
{
type Id = EdgeId;
fn id( &self ) -> Self::Id
{
self.id
}
}
impl< EdgeId, NodeId > EdgeBasicInterface
for Edge< EdgeId, NodeId >
where
EdgeId : IdentityInterface,
NodeId : IdentityInterface,
{
}
impl< EdgeId, NodeId > PartialEq
for Edge< EdgeId, NodeId >
where
EdgeId : IdentityInterface,
NodeId : IdentityInterface,
{
fn eq( &self, other : &Self ) -> bool
{
self.id() == other.id()
}
}
impl< EdgeId, NodeId > Eq
for Edge< EdgeId, NodeId >
where
EdgeId : IdentityInterface,
NodeId : IdentityInterface,
{}
}
crate::mod_interface!
{
orphan use super::private::Edge;
}