Enum nannou::app::LoopMode[][src]

pub enum LoopMode {
    Rate {
        update_interval: Duration,
    },
    Wait {
        updates_following_event: usize,
        update_interval: Duration,
    },
}

The mode in which the App is currently running the event loop.

Variants

Specifies that the application is continuously looping at a consistent rate.

An application running in the Rate loop mode will behave as follows:

  1. Poll for and collect all pending user input. update is then called with all application events that have occurred.

  2. update is called with an Event::Update.

  3. draw is called.

  4. Check the time and sleep for the remainder of the update_intervale.

Fields of Rate

The minimum interval between emitted updates.

Fields of Wait

The number of updates (and in turn draws) that should occur since the application last received a non-Update event.

The minimum interval between emitted updates.

Methods

impl LoopMode
[src]

DEFAULT_RATE_FPS: f64 = 60.0

DEFAULT_UPDATES_FOLLOWING_EVENT: usize = 3

Specify the Rate mode with the given frames-per-second.

Specify the Wait mode with the given number of updates following each non-Update event.

Uses the default update interval.

Specify the Wait mode with the given number of updates following each non-Update event.

Waits long enough to ensure loop iteration never occurs faster than the given max_fps.

Specify the Wait mode with the given number of updates following each non-Update event.

Waits long enough to ensure loop iteration never occurs faster than the given max_fps.

Trait Implementations

impl Copy for LoopMode
[src]

impl Clone for LoopMode
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for LoopMode
[src]

Formats the value using the given formatter. Read more

impl PartialEq for LoopMode
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Default for LoopMode
[src]

Returns the "default value" for a type. Read more

Auto Trait Implementations

impl Send for LoopMode

impl Sync for LoopMode