[−][src]Struct wayland_client::GlobalManager
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]
F: FnMut(GlobalEvent, Proxy<WlRegistry>) + Send + 'static,
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]
&self,
implementor: F
) -> Result<Proxy<I>, GlobalError> where
F: FnOnce(NewProxy<I>) -> Proxy<I>,
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]
&self,
version: u32,
implementor: F
) -> Result<Proxy<I>, GlobalError> where
F: FnOnce(NewProxy<I>) -> Proxy<I>,
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(&self) -> 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]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,