/// A trait representing a Value Object in Domain-Driven Design (DDD).
/// A value object is an immutable type that is defined by its attributes rather than a unique identity.
/// Can be used to encapsulate simple data types with validation logic like Emails or Ids.
/// # Examples
/// ```ignore
/// struct Email {
/// value: String,
/// }
/// impl ValueObject for Email {
/// type Value = String;
///
/// fn validate(&self) -> Result<(), Box<dyn std::error::Error>> {
/// if self.value.contains('@') {
/// Ok(())
/// } else {
/// Err("Invalid email format".into())
/// }
/// }
///
/// fn value(&self) -> Self::Value {
/// self.value.clone()
/// }
/// }
/// impl Email {
/// fn new(value: String) -> Result<Self, Box<dyn std::error::Error>> {
/// let email = Email { value };
/// email.validate()?;
/// Ok(email)
/// }
/// }
/// ````