use std::borrow::Cow;
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
pub struct DataErrorsChangedEventArgs {
property_name: Option<Cow<'static, str>>,
}
impl DataErrorsChangedEventArgs {
pub fn new(property_name: Option<&str>) -> Self {
Self { property_name: property_name.map(|name| Cow::Owned(name.to_owned())) }
}
pub const fn from_static(property_name: &'static str) -> Self {
Self { property_name: Some(Cow::Borrowed(property_name)) }
}
pub fn property_name(&self) -> Option<&str> {
self.property_name.as_deref()
}
}