Struct wayland_client::globals::GlobalList
source · [−]pub struct GlobalList { /* private fields */ }
Expand description
A helper to retrieve a list of globals and bind them
The GlobalList
can be used as a Dispatch
target for the wl_registry
. It
maintains a list of globals advertized by the compositor, and provides a way to bind according to
specified version requirements. It is an easy way to ensure at startup that the server advertized
all the globals your app needs, and bind them all at once.
Implementations
Create a new GLobalList
Access the list of currently advertized globals
pub fn bind<I: Proxy + 'static, D: Dispatch<I> + 'static>(
&self,
conn: &mut ConnectionHandle<'_>,
qh: &QueueHandle<D>,
registry: &WlRegistry,
version: Range<u32>,
user_data: <D as Dispatch<I>>::UserData
) -> Result<I, BindError>
pub fn bind<I: Proxy + 'static, D: Dispatch<I> + 'static>(
&self,
conn: &mut ConnectionHandle<'_>,
qh: &QueueHandle<D>,
registry: &WlRegistry,
version: Range<u32>,
user_data: <D as Dispatch<I>>::UserData
) -> Result<I, BindError>
Bind a global
You can specify the requested interface as type parameter, and the version range. You also need to provide the user data value that will be set for the newly created object.
Trait Implementations
Performs the conversion.
impl<D> DelegateDispatch<WlRegistry, D> for GlobalList where
D: Dispatch<WlRegistry, UserData = ()> + AsMut<GlobalList>,
impl<D> DelegateDispatch<WlRegistry, D> for GlobalList where
D: Dispatch<WlRegistry, UserData = ()> + AsMut<GlobalList>,
fn event(
handle: &mut D,
_: &WlRegistry,
event: Event,
_: &(),
_: &mut ConnectionHandle<'_>,
_: &QueueHandle<D>
)
fn event(
handle: &mut D,
_: &WlRegistry,
event: Event,
_: &(),
_: &mut ConnectionHandle<'_>,
_: &QueueHandle<D>
)
Called when an event from the server is processed. Read more
Method used to initialize the user-data of objects created by events Read more
fn event(
&mut self,
proxy: &WlRegistry,
event: Event,
data: &Self::UserData,
connhandle: &mut ConnectionHandle<'_>,
qhandle: &QueueHandle<Self>
)
fn event(
&mut self,
proxy: &WlRegistry,
event: Event,
data: &Self::UserData,
connhandle: &mut ConnectionHandle<'_>,
qhandle: &QueueHandle<Self>
)
Called when an event from the server is processed. Read more
Method used to initialize the user-data of objects created by events Read more
Auto Trait Implementations
impl RefUnwindSafe for GlobalList
impl Send for GlobalList
impl Sync for GlobalList
impl Unpin for GlobalList
impl UnwindSafe for GlobalList
Blanket Implementations
Mutably borrows from an owned value. Read more
impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read more
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more