WlCallback

Struct WlCallback 

Source
pub struct WlCallback { /* private fields */ }
Expand description

A wl_callback object.

See the documentation of the module for the interface description.

Implementations§

Source§

impl WlCallback

Source

pub fn set_handler(&self, handler: impl WlCallbackHandler)

Sets a new handler.

Source

pub fn set_boxed_handler(&self, handler: Box<dyn WlCallbackHandler>)

Sets a new, already boxed handler.

Source§

impl WlCallback

Source

pub const MSG__DONE__SINCE: u32 = 1u32

Since when the done message is available.

Source

pub fn try_send_done(&self, callback_data: u32) -> Result<(), ObjectError>

done event

Notify the client when the related request is done.

§Arguments
  • callback_data: request-specific data for the callback
Source

pub fn send_done(&self, callback_data: u32)

done event

Notify the client when the related request is done.

§Arguments
  • callback_data: request-specific data for the callback

Trait Implementations§

Source§

impl ConcreteObject for WlCallback

Source§

const XML_VERSION: u32 = 1u32

The interface version from the XML file that the interface was generated from.
Source§

const INTERFACE: ObjectInterface = ObjectInterface::WlCallback

The interface of the object.
Source§

const INTERFACE_NAME: &str = "wl_callback"

The interface of the object as a string.
Source§

impl Debug for WlCallback

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Object for WlCallback

Source§

fn core(&self) -> &ObjectCore

Returns the ObjectCore of this object.
Source§

fn unset_handler(&self)

Unsets the handler of this object. Read more
Source§

fn get_handler_any_ref( &self, ) -> Result<HandlerRef<'_, dyn Any>, HandlerAccessError>

Returns a shared reference to the handler.
Source§

fn get_handler_any_mut( &self, ) -> Result<HandlerMut<'_, dyn Any>, HandlerAccessError>

Returns a mutable reference to the handler.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ObjectCoreApi for T
where T: Object + ?Sized,

Source§

fn state(&self) -> &Rc<State>

Returns the State of this object.
Source§

fn client(&self) -> Option<Rc<Client>>

Returns the Client associated with this object, if any.
Source§

fn create_child<P>(&self) -> Rc<P>
where P: Object,

Creates a child of this object. Read more
Source§

fn interface(&self) -> ObjectInterface

Returns the ObjectInterface of this object.
Source§

fn version(&self) -> u32

Returns the version of this object.
Source§

fn unique_id(&self) -> u64

Returns the unique ID of this object. Read more
Source§

fn client_id(&self) -> Option<u32>

Returns the client ID of this object, if any.
Source§

fn server_id(&self) -> Option<u32>

Returns the server ID of this object, if any.
Source§

fn delete_id(&self)

Sends a wl_display.delete_id event for this object. Read more
Source§

fn try_delete_id(&self) -> Result<(), ObjectError>

Tries to send a wl_display.delete_id event for this object. Read more
Source§

fn set_forward_to_client(&self, enabled: bool)

Enables or disables automatic forwarding of events to the client. Read more
Source§

fn set_forward_to_server(&self, enabled: bool)

Enables or disables automatic forwarding of requests to the server. Read more
Source§

impl<T> ObjectUtils for T
where T: Object + ?Sized,

Source§

fn try_get_handler_ref<T>( &self, ) -> Result<HandlerRef<'_, T>, HandlerAccessError>
where T: 'static,

Tries to get a shared reference to the handler.
Source§

fn get_handler_ref<T>(&self) -> HandlerRef<'_, T>
where T: 'static,

Gets a shared reference to the handler. Read more
Source§

fn try_get_handler_mut<T>( &self, ) -> Result<HandlerMut<'_, T>, HandlerAccessError>
where T: 'static,

Tries to get a mutable reference to the handler.
Source§

fn get_handler_mut<T>(&self) -> HandlerMut<'_, T>
where T: 'static,

Gets a mutable reference to the handler. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.