wayland_bridge::object

Trait RequestReceiver

Source
pub trait RequestReceiver<I: Interface>: Any + Sized {
    // Required method
    fn receive(
        this: ObjectRef<Self>,
        request: I::Incoming,
        client: &mut Client,
    ) -> Result<(), Error>;
}
Expand description

The |RequestReceiver| trait is what high level code will use to work with request messages for a given type.

Required Methods§

Source

fn receive( this: ObjectRef<Self>, request: I::Incoming, client: &mut Client, ) -> Result<(), Error>

Handle a decoded message for the associated |Interface|.

|self| is not directly provided, but instead is provided as an |ObjectId| that can be used to get a reference to self.

Ex: struct MyReceiver;

impl RequestReceiver for MyReceiver { fn receive(mut this: ObjectRef, request: MyInterfaceRequest, client: &mut Client ) -> Result<(), Error> { let this = self.get()?; let this_mut = self.get_mut()?; } }

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl RequestReceiver<WlBuffer> for Buffer

Source§

impl RequestReceiver<WlCallback> for Callback

Source§

impl RequestReceiver<WlCompositor> for Compositor

Source§

impl RequestReceiver<WlDataDeviceManager> for DataDeviceManager

Source§

impl RequestReceiver<WlKeyboard> for Keyboard

Source§

impl RequestReceiver<WlOutput> for Output

Source§

impl RequestReceiver<WlPointer> for Pointer

Source§

impl RequestReceiver<WlRegion> for Region

Source§

impl RequestReceiver<WlSeat> for Seat

Source§

impl RequestReceiver<WlShm> for Shm

Source§

impl RequestReceiver<WlSubcompositor> for Subcompositor

Source§

impl RequestReceiver<WlSubsurface> for Subsurface

Source§

impl RequestReceiver<WlSurface> for Surface

Source§

impl RequestReceiver<WlTouch> for Touch

Source§

impl RequestReceiver<WpViewporter> for Viewporter

Source§

impl RequestReceiver<XdgPopup> for XdgPopup

Source§

impl RequestReceiver<XdgPositioner> for XdgPositioner

Source§

impl RequestReceiver<XdgSurface> for XdgSurface

Source§

impl RequestReceiver<XdgToplevel> for XdgToplevel

Source§

impl RequestReceiver<XdgWmBase> for XdgShell

Source§

impl RequestReceiver<ZauraOutput> for AuraOutput

Source§

impl RequestReceiver<ZauraShell> for AuraShell

Source§

impl RequestReceiver<ZcrAlphaCompositingV1> for AlphaCompositing

Source§

impl RequestReceiver<ZcrSecureOutputV1> for SecureOutput

Source§

impl RequestReceiver<ZwpLinuxBufferParamsV1> for LinuxBufferParams

Source§

impl RequestReceiver<ZwpLinuxDmabufV1> for LinuxDmabuf

Source§

impl RequestReceiver<ZwpPointerConstraintsV1> for PointerConstraints

Source§

impl RequestReceiver<ZwpRelativePointerManagerV1> for RelativePointerManager

Source§

impl RequestReceiver<ZwpRelativePointerV1> for RelativePointer