glim-tui 0.1.0

A TUI for monitoring GitLab CI/CD pipelines and projects
1
2
3
4
5
6
7
8
9
10
11
12
use std::sync::mpsc;
use crate::event::GlimEvent;

pub trait Dispatcher {
    fn dispatch(&self, event: GlimEvent);
}

impl Dispatcher for mpsc::Sender<GlimEvent> {
    fn dispatch(&self, event: GlimEvent) {
        self.send(event).expect("unable to send event");
    }
}