1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
//! Generic policy engine for conflict resolution and resource management
//!
//! This module provides a generic, trait-based policy engine that can be used
//! with any domain model (Commands, Nodes, Cells, Capabilities, etc.).
//!
//! ## Architecture
//!
//! - **Conflictable**: Trait that types implement to participate in conflict resolution
//! - **ResolutionPolicy**: Trait for defining custom conflict resolution strategies
//! - **GenericConflictResolver**: Generic resolver that works with any Conflictable type
//!
//! ## Example
//!
//! ```rust,ignore
//! use peat_protocol::policy::{Conflictable, GenericConflictResolver, LastWriteWinsPolicy};
//! use std::collections::HashMap;
//!
//! // Any type can implement Conflictable
//! struct MyType {
//! my_id: String,
//! resource: String,
//! created_at: u64,
//! }
//!
//! impl Conflictable for MyType {
//! fn id(&self) -> String { self.my_id.clone() }
//! fn conflict_keys(&self) -> Vec<String> { vec![self.resource.clone()] }
//! fn timestamp(&self) -> Option<u64> { Some(self.created_at) }
//! fn attributes(&self) -> HashMap<String, AttributeValue> { HashMap::new() }
//! }
//!
//! // Use the generic resolver
//! let resolver = GenericConflictResolver::<MyType>::new();
//! let policy = LastWriteWinsPolicy;
//! ```
pub use ;
pub use ;
pub use GenericConflictResolver;