pub trait NodeKeyRef<'a, N, K>
where
N: 'a,
K: 'a,
{
fn node(&self) -> &'a N;
fn key(&self) -> &'a K;
}
impl<'a, N, K> NodeKeyRef<'a, N, K> for &'a (N, K)
where
N: 'a,
K: 'a,
{
fn node(&self) -> &'a N {
&self.0
}
fn key(&self) -> &'a K {
&self.1
}
}
impl<'a, N, K> NodeKeyRef<'a, N, K> for (&'a N, &'a K)
where
N: 'a,
K: 'a,
{
fn node(&self) -> &'a N {
self.0
}
fn key(&self) -> &'a K {
self.1
}
}