euv_core/event/trait.rs
1use crate::*;
2
3/// Trait for types that can be converted into an event attribute value.
4///
5/// Allows event handlers and optional handlers to be used as attribute values.
6pub trait IntoEventAttribute {
7 /// Converts this value into an `AttributeValue`, or an empty text if None.
8 fn into_event_attribute(self) -> AttributeValue;
9}