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

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

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

fn send(&mut self, event: Event) -> Result<(), SendError<Event>>

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

Loading content...

Implementations on Foreign Types

impl Sender for Sender<Event>[src]

impl Sender for Sender<Event>[src]

Loading content...

Implementors

Loading content...