pub struct Poster(/* private fields */);Expand description
Entrega funções para a thread da interface. Barato de clonar; vale de qualquer thread.
Implementations§
Source§impl Poster
impl Poster
Sourcepub fn post(&self, job: impl FnOnce(&mut Ui) + Send + 'static)
pub fn post(&self, job: impl FnOnce(&mut Ui) + Send + 'static)
Agenda job para rodar na thread da interface e acorda a interface.
Sourcepub fn wake(&self)
pub fn wake(&self)
Só acorda a interface (ela repinta se algo mudou, e roda o que estiver agendado).
Um acorde pendente vale por todos até o Ui::process_posted: só o primeiro chama a
função da plataforma.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Poster
impl Freeze for Poster
impl Move for Poster
impl RefUnwindSafe for Posterwhere
Atomic<usize>: RefUnwindSafe,
Mutex<VecDeque<Box<dyn FnOnce(&mut Ui) + Send>>>: RefUnwindSafe,
Mutex<Option<Arc<dyn Fn() + Send + Sync>>>: RefUnwindSafe,
Atomic<bool>: RefUnwindSafe,
impl Send for Poster
impl Sync for Poster
impl Unpin for Poster
impl UnsafeUnpin for Posterwhere
*const ArcInner<PostQueue> is !null: UnsafeUnpin,
PhantomData<ArcInner<PostQueue>>: UnsafeUnpin,
impl UnwindSafe for Posterwhere
Arc<PostQueue>: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more