[][src]Struct wayland_client::GlobalManager

pub struct GlobalManager { /* fields omitted */ }

An utility to manage global objects

This utility provides an implemenation for the registry that track the list of globals for you, as well as utilities to bind them.

Methods

impl GlobalManager[src]

pub fn new(display: &Proxy<WlDisplay>) -> GlobalManager[src]

Create a global manager handling a registry

pub fn new_with_cb<F>(display: &Proxy<WlDisplay>, callback: F) -> GlobalManager where
    F: FnMut(GlobalEvent, Proxy<WlRegistry>) + Send + 'static, 
[src]

Create a global manager handling a registry with a callback

This global manager will track globals as a simple one, but will also forward the registry events to your callback.

This can be used if you want to handle specially certain globals, but want to use the default mechanism for the rest.

pub fn instantiate_auto<I: Interface, F>(
    &self,
    implementor: F
) -> Result<Proxy<I>, GlobalError> where
    F: FnOnce(NewProxy<I>) -> Proxy<I>, 
[src]

Instantiate a global with highest available version

This method is only appropriate for globals that are expected to not exist with multiplicity (such as wl_compositor or wl_shm), as it will only bind a single one.

pub fn instantiate_exact<I: Interface, F>(
    &self,
    version: u32,
    implementor: F
) -> Result<Proxy<I>, GlobalError> where
    F: FnOnce(NewProxy<I>) -> Proxy<I>, 
[src]

Instantiate a global with a specific version

Like instantiate_auto, but will bind a specific version of this global an not the highest available.

pub fn list(&self) -> Vec<(u32, String, u32)>[src]

Retrieve the list of currently known globals

Trait Implementations

impl Clone for GlobalManager[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl Unpin for GlobalManager

impl Sync for GlobalManager

impl Send for GlobalManager

impl !UnwindSafe for GlobalManager

impl !RefUnwindSafe for GlobalManager

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]