use std::{future::Future, sync::Arc};
use nodecraft::{CheapClone, Id};
use crate::types::NodeState;
#[auto_impl::auto_impl(Box, Arc)]
pub trait ConflictDelegate: Send + Sync + 'static {
type Id: Id;
type Address: CheapClone + Send + Sync + 'static;
fn notify_conflict(
&self,
existing: Arc<NodeState<Self::Id, Self::Address>>,
other: Arc<NodeState<Self::Id, Self::Address>>,
) -> impl Future<Output = ()> + Send;
}