# PhaseItem in maplibre::render::render_phase::draw - Rust
An item which will be drawn to the screen. A phase item should be queued up for rendering during the `RenderStageLabel::Queue` stage. Afterwards it will be sorted and rendered automatically in the `RenderStageLabel::PhaseSort` stage and `RenderStageLabel::Render` stage, respectively.
Keywords: rust, rustlang, rust-lang, PhaseItem

# Trait maplibre::render::render_phase::draw::PhaseItem

source · [−]

    pub trait PhaseItem {
        type SortKey: Ord;
        fn sort_key(&self) -> Self::SortKey;
    }

Expand description

An item which will be drawn to the screen. A phase item should be queued up for rendering during the `RenderStageLabel::Queue` stage. Afterwards it will be sorted and rendered automatically in the `RenderStageLabel::PhaseSort` stage and `RenderStageLabel::Render` stage, respectively.

## Associated Types

source

#### type SortKey: Ord

The type used for ordering the items. The smallest values are drawn first.

## Required methods

source

#### fn sort_key(&self) -> Self::SortKey

Determines the order in which the items are drawn during the corresponding `RenderPhase`.

## Implementations on Foreign Types

source

### impl PhaseItem for ( IndexEntry, TileShape )

#### type SortKey = u32

source

#### fn sort_key(&self) -> Self::SortKey

## Implementors

source

### impl PhaseItem for TileInView

#### type SortKey = ()