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
sourceimpl GlobalList
impl GlobalList
sourcepub fn new() -> GlobalList
pub fn new() -> GlobalList
Create a new GLobalList
sourcepub fn list(&self) -> &[GlobalDescription]
pub fn list(&self) -> &[GlobalDescription]
Access the list of currently advertized globals
sourcepub 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
sourceimpl AsMut<GlobalList> for GlobalList
impl AsMut<GlobalList> for GlobalList
sourcefn as_mut(&mut self) -> &mut GlobalList
fn as_mut(&mut self) -> &mut GlobalList
Performs the conversion.
sourceimpl Debug for GlobalList
impl Debug for GlobalList
sourceimpl Default for GlobalList
impl Default for GlobalList
sourceimpl<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>,
sourcefn 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
sourcefn event_created_child(
opcode: u16,
_qhandle: &QueueHandle<D>
) -> Arc<dyn ObjectData>
fn event_created_child(
opcode: u16,
_qhandle: &QueueHandle<D>
) -> Arc<dyn ObjectData>
Method used to initialize the user-data of objects created by events Read more
sourceimpl DelegateDispatchBase<WlRegistry> for GlobalList
impl DelegateDispatchBase<WlRegistry> for GlobalList
sourceimpl Dispatch<WlRegistry> for GlobalList
impl Dispatch<WlRegistry> for GlobalList
sourcefn 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
sourcefn event_created_child(
opcode: u16,
_qhandle: &QueueHandle<Self>
) -> Arc<dyn ObjectData>
fn event_created_child(
opcode: u16,
_qhandle: &QueueHandle<Self>
) -> Arc<dyn ObjectData>
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
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
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
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
fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
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