1 2 3 4 5 6 7 8 9 10 11 12
use crate::messages::events::event::{EventContext, OnEvent}; #[derive(Debug, Default)] pub struct ShutdownEvent; impl OnEvent for ShutdownEvent { fn on_event(self, ctx: &mut EventContext) -> crate::Result<()> { ctx.cord.shutdown(); Ok(()) } }