Trait RequestDispatch

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

    // Required methods
    fn create_surface<'a>(
        ctx: &'a mut Ctx,
        object_id: u32,
        id: NewId,
    ) -> Self::CreateSurfaceFut<'a>;
    fn create_region<'a>(
        ctx: &'a mut Ctx,
        object_id: u32,
        id: NewId,
    ) -> Self::CreateRegionFut<'a>;
}

Required Associated Types§

Source

type Error

Source

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

Type of future returned by create_surface

Source

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

Type of future returned by create_region

Required Methods§

Source

fn create_surface<'a>( ctx: &'a mut Ctx, object_id: u32, id: NewId, ) -> Self::CreateSurfaceFut<'a>

create new surface

Ask the compositor to create a new surface.

Source

fn create_region<'a>( ctx: &'a mut Ctx, object_id: u32, id: NewId, ) -> Self::CreateRegionFut<'a>

create new region

Ask the compositor to create a new region.

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§