[][src]Type Definition nannou::ui::prelude::widget::Id

type Id = NodeIndex<u32>;

Unique widget identifier.

Each widget instance must use its own, uniquely generated widget::Id so that it's state can be cached within the Ui type.

Indices are generated consecutively from 0. This allows us to avoid the need for hashing identifiers in favour of indexing directly into the Graph's underlying node array.

widget::Ids may be generated via the widget_ids! macro.