[−][src]Struct conrod_core::widget::id::Generator
Used for generating new unique widget::Id
s.
Generator
is used by the widget_ids!
macro and the types and fields that it generates in
order to generate unique widget::Id
s for each of the generated fields.
Implementations
impl<'a> Generator<'a>
[src]
pub fn new(widget_graph: &'a mut Graph) -> Self
[src]
Constructor for a new widget::Id
generator.
pub fn next(&mut self) -> Id
[src]
Generate a new, unique widget::Id
into a Placeholder node within the widget graph. This
should only be called once for each unique widget needed to avoid unnecessary bloat within
the Ui
's widget graph.
When using this method, be sure to store the returned widget::Id
somewhere so that it can
be re-used on next update.
Panics if adding another node would exceed the maximum capacity for node indices.
Auto Trait Implementations
impl<'a> !RefUnwindSafe for Generator<'a>
impl<'a> Send for Generator<'a>
impl<'a> !Sync for Generator<'a>
impl<'a> Unpin for Generator<'a>
impl<'a> !UnwindSafe for Generator<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,