[][src]Trait uniui_core::Slot

pub trait Slot<T> {
    fn exec_for(&self, t: T) -> bool;
fn proxy(&self) -> SlotProxy<T>; }

Slot represents a queue where data may be placed.

Required methods

fn exec_for(&self, t: T) -> bool

Add new instance of data to the queue.

Return true if data was added or false if the other side is not interested in data receiving anymore (and never will be interested again).

fn proxy(&self) -> SlotProxy<T>

Creates SlotProxy for particular slot. The SlotProxy may be saved separatedly from the original Slot but still may be used to send new instance of data to the original Slot. SlotProxy do not provide any mechanism to retrive data from the queue.

Proxy created for another SlotProxy still will refer to the original Slot.

Loading content...


impl<T> Slot<T> for SlotImpl<T>[src]

impl<T> Slot<T> for SlotProxy<T>[src]

Loading content...