# Draw in maplibre::render::render_phase - Rust
A draw function which is used to draw a specific `PhaseItem`.

# Trait maplibre::render::render_phase::Draw

source ·

    pub trait Draw<P: PhaseItem>: 'static {
        // Required method
        fn draw<'w>(
            &self,
            pass: &mut TrackedRenderPass<'w>,
            wold: &'w World,
            item: &P
        );
    }

Expand description

A draw function which is used to draw a specific `PhaseItem`.

They are the the general form of drawing items, whereas `RenderCommands` are more modular.

## Required Methods§

source

#### fn draw<'w>(&self, pass: &mut TrackedRenderPass<'w>, wold: &'w World, item: &P)

Draws the `PhaseItem` by issuing draw calls via the `TrackedRenderPass`.

## Implementors§

source §

### impl<P, C> Draw<P> for DrawState<P, C>
where P: PhaseItem + 'static, C: RenderCommand<P> + 'static,