# Draw in maplibre::render::render_phase::draw - Rust
A draw function which is used to draw a specific [`PhaseItem`].
Keywords: rust, rustlang, rust-lang, Draw

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

source · [−]

    pub trait Draw<P: PhaseItem>: 'static {
        fn draw<'w>(
            &mut self,
            pass: &mut TrackedRenderPass<'w>,
            state: &'w RenderState,
            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>(
&mut self,
pass: &mut TrackedRenderPass<'w>,
state: &'w RenderState,
item: &P
)

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

## Implementors

source

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