evo_framework 2025.2.51300

Evo(lution) framework: A powerful framework designed for ai
Documentation
/// A trait representing a generic entity with a unique identifier.
///
/// This trait provides methods to retrieve and set the identifier of an entity. 
/// The identifier can be of any type that implements the `T` generic type parameter.
pub trait ID<K> {
    /// Get the unique identifier of the entity.
    ///
    /// # Returns
    ///
    /// A value of type `T` that represents the unique identifier.
    fn id(&self) -> K;

    /// Set the unique identifier of the entity.
    ///
    /// # Parameters
    ///
    /// * `id` - A value of type `T` representing the new unique identifier to be set.
    fn set_id(&mut self, id: K);


}