Struct conrod::WidgetId
[−]
[src]
pub struct WidgetId(pub usize);
Unique, public widget identifier. Each widget must use a unique WidgetId
so that it's state
can be cached within the Ui
type. The reason we use a usize is because widgets are cached
within a Graph
whose max number of Node
s is indexed by usize.
Trait Implementations
impl GraphIndex for WidgetId
[src]
fn to_widget_id(self, _map: &IndexMap) -> Option<WidgetId>
If not one already, convert Self to a WidgetId if it exists within the IndexMap.
fn to_node_index(self, map: &IndexMap) -> Option<NodeIndex>
If not one already, convert Self to a NodeIndex if it exists within the IndexMap.
fn from_idx<I: GraphIndex>(other: I, map: &IndexMap) -> Option<Self>
Convert some GraphIndex type to Self.
impl Ord for Id
[src]
fn cmp(&self, __arg_0: &Id) -> Ordering
This method returns an Ordering
between self
and other
. Read more
impl PartialOrd for Id
[src]
fn partial_cmp(&self, __arg_0: &Id) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, __arg_0: &Id) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, __arg_0: &Id) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, __arg_0: &Id) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, __arg_0: &Id) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Eq for Id
[src]
impl PartialEq for Id
[src]
fn eq(&self, __arg_0: &Id) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Id) -> bool
This method tests for !=
.
impl Hash for Id
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
Feeds this value into the state given, updating the hasher as necessary.
fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher
1.3.0
Feeds a slice of this type into the state provided.
impl Debug for Id
[src]
impl Clone for Id
[src]
fn clone(&self) -> Id
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Copy for Id
[src]
impl From<usize> for Id
[src]
impl Add<usize> for Id
[src]
Simplify the incrementation of an Id in for
loops i.e. this allows:
for i in 0..num_widgets { MyWidget::new().set(MY_WIDGET + i, ui); }