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

    // Required methods
    fn destroy<'a>(ctx: &'a mut Ctx, object_id: u32) -> Self::DestroyFut<'a>;
    fn add<'a>(
        ctx: &'a mut Ctx,
        object_id: u32,
        x: i32,
        y: i32,
        width: i32,
        height: i32
    ) -> Self::AddFut<'a>;
    fn subtract<'a>(
        ctx: &'a mut Ctx,
        object_id: u32,
        x: i32,
        y: i32,
        width: i32,
        height: i32
    ) -> Self::SubtractFut<'a>;
}

Required Associated Types§

source

type Error

source

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

Type of future returned by destroy

source

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

Type of future returned by add

source

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

Type of future returned by subtract

Required Methods§

source

fn destroy<'a>(ctx: &'a mut Ctx, object_id: u32) -> Self::DestroyFut<'a>

destroy region

Destroy the region. This will invalidate the object ID.

source

fn add<'a>( ctx: &'a mut Ctx, object_id: u32, x: i32, y: i32, width: i32, height: i32 ) -> Self::AddFut<'a>

add rectangle to region

Add the specified rectangle to the region.

source

fn subtract<'a>( ctx: &'a mut Ctx, object_id: u32, x: i32, y: i32, width: i32, height: i32 ) -> Self::SubtractFut<'a>

subtract rectangle from region

Subtract the specified rectangle from the region.

Implementors§