pub struct TriggerEvent {
pub name: String,
pub data: Value,
}Expand description
触发规则引擎使用的内部事件类型。
封装了事件名称和 JSON payload,通过 EventBus 传递。
Fields§
§name: String事件名称。
data: Value事件的 JSON payload 数据。
Trait Implementations§
Source§impl Clone for TriggerEvent
impl Clone for TriggerEvent
Source§fn clone(&self) -> TriggerEvent
fn clone(&self) -> TriggerEvent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TriggerEvent
impl Debug for TriggerEvent
Source§impl Event for TriggerEvent
impl Event for TriggerEvent
Source§fn event_name() -> &'static str
fn event_name() -> &'static str
Unique name for this event type, used for routing and topic matching.
Source§fn topic() -> &'static str
fn topic() -> &'static str
Topic this event belongs to. Default is the event_name itself. Read more
Auto Trait Implementations§
impl Freeze for TriggerEvent
impl RefUnwindSafe for TriggerEvent
impl Send for TriggerEvent
impl Sync for TriggerEvent
impl Unpin for TriggerEvent
impl UnsafeUnpin for TriggerEvent
impl UnwindSafe for TriggerEvent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more