Trait quickmd::background::Sender[][src]

pub trait Sender {
    fn send(&mut self, event: Event) -> Result<(), SendError<Event>>;
}
Expand description

A common trait for glib::Sender and std::mpsc::Sender.

Both of them have the exact same send method, down to the error type they use. Still, we need a shared trait to use in the init_update_loop function.

In practice, we only use glib::Sender in “real code”, but std::mpsc::Sender allows easier testing, so that’s why this trait exists.

Required methods

Send a ui::Event to the receiver at the other end

Implementations on Foreign Types

Implementors