[][src]Trait uniui_base::prelude::Slot

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

Slot represents a queue where data may be placed.

Required methods

pub fn exec_for(&self, t: T) -> bool[src]

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).

pub fn proxy(&self) -> SlotProxy<T>[src]

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...

Implementors

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

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

Loading content...