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()?; } }

Object Safety§

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