pub trait GlobalImplementor<I: Interface + AsRef<Proxy<I>> + From<Proxy<I>>> {
    // Required method
    fn new_global(&mut self, global: Main<I>, data: DispatchData<'_>);

    // Provided method
    fn error(&mut self, _version: u32, _data: DispatchData<'_>) { ... }
}
Expand description

A trait for implementation of the global advertisement

It is automatically implemented for FnMut(Main<I>, DispatchData) closures, in which case the error messages are ignored.

Required Methods§

source

fn new_global(&mut self, global: Main<I>, data: DispatchData<'_>)

A new global of given interface has been instantiated and you can assign a filter to it.

Provided Methods§

source

fn error(&mut self, _version: u32, _data: DispatchData<'_>)

A global was advertised but its version was lower than the minimal version you requested.

The advertised version is provided as argument.

Implementors§

source§

impl<F, I> GlobalImplementor<I> for Fwhere I: Interface + AsRef<Proxy<I>> + From<Proxy<I>>, F: FnMut(Main<I>, DispatchData<'_>),