impl_from_object_ref

Macro impl_from_object_ref 

Source
macro_rules! impl_from_object_ref {
    ($type:ty) => { ... };
}
Expand description

Expands to implement From for crate::ObjectRef. This depends on the struct to have an item field of type crate::ObjectRef.

impl_from_object_ref!(TextAttributesChangedEvent);

Exapnds to:

impl From<ObjectRef> for TextAttributesChangedEvent {
    fn from(obj_ref: ObjectRef) -> Self {
        Self { item: obj_ref.into() }
    }
}