Trait RequestDispatch

Source
pub trait RequestDispatch<Ctx> {
    type Error;
    type CreatePoolFut<'a>: Future<Output = Result<(), Self::Error>> + 'a
       where Ctx: 'a;

    // Required method
    fn create_pool<'a>(
        ctx: &'a mut Ctx,
        object_id: u32,
        id: NewId,
        fd: Fd,
        size: i32,
    ) -> Self::CreatePoolFut<'a>;
}

Required Associated Types§

Source

type Error

Source

type CreatePoolFut<'a>: Future<Output = Result<(), Self::Error>> + 'a where Ctx: 'a

Type of future returned by create_pool

Required Methods§

Source

fn create_pool<'a>( ctx: &'a mut Ctx, object_id: u32, id: NewId, fd: Fd, size: i32, ) -> Self::CreatePoolFut<'a>

create a shm pool

Create a new wl_shm_pool object.

The pool can be used to create shared memory based buffer objects. The server will mmap size bytes of the passed file descriptor, to use as backing memory for the pool.

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§