var searchIndex = {}; searchIndex["amethyst_engine"] = {"doc":"Game engine sitting atop the core libraries.","items":[[3,"Duration","amethyst_engine","ISO 8601 time duration with nanosecond precision.\nThis also allows for the negative duration; see individual methods for details.",null,null],[3,"SteadyTime","","A structure representing a moment in time.",null,null],[3,"Application","","User-friendly facade for building games. Manages main loop.",null,null],[3,"StateMachine","","A simple stack-based state machine (pushdown automaton).",null,null],[3,"Stopwatch","","Useful utility for accurately measuring elapsed time.",null,null],[4,"Trans","","Types of state transitions.",null,null],[13,"None","","Continue as normal.",0,null],[13,"Pop","","Remove the active state and resume the next state on the stack or stop if there are none.",0,null],[13,"Push","","Pause the active state and push a new state onto the stack.",0,null],[13,"Switch","","Remove the current state on the stack and insert a different one.",0,null],[13,"Quit","","Stop and remove all states and shut down the engine.",0,null],[11,"new","","Creates a new Application with the given initial game state.",1,{"inputs":[{"name":"t"}],"output":{"name":"application"}}],[11,"run","","Starts the application and manages the game loop.",1,null],[11,"new","","",2,{"inputs":[{"name":"t"}],"output":{"name":"statemachine"}}],[11,"is_running","","Checks whether the state machine is running.",2,null],[11,"start","","Initializes the state machine.\n# Panics\nPanics if no states are present in the stack.",2,null],[11,"handle_events","","Passes a vector of events to the active state to handle.",2,null],[11,"fixed_update","","Updates the currently active state at a steady, fixed interval.",2,null],[11,"update","","Updates the currently active state immediately.",2,null],[11,"new","","",3,{"inputs":[],"output":{"name":"stopwatch"}}],[11,"elapsed","","Retrieves the elapsed time.",3,null],[11,"restart","","Stops, resets, and starts the stopwatch again.",3,null],[11,"start","","Starts, or resumes, measuring elapsed time. If the stopwatch has been\nstarted and stopped before, the new results are compounded onto the\nexisting elapsed time value.",3,null],[11,"stop","","Stops measuring elapsed time.",3,null],[11,"reset","","Clears the current elapsed time value.",3,null],[8,"State","","A trait which defines game states that can be used by the state machine.",null,null],[11,"on_start","","Executed when the game state begins.",4,null],[11,"on_stop","","Executed when the game state exits.",4,null],[11,"on_pause","","Executed when a different game state is pushed onto the stack.",4,null],[11,"on_resume","","Executed when the application returns to this game state once again.",4,null],[11,"handle_events","","Executed on every frame before updating, for use in reacting to events.",4,null],[11,"fixed_update","","Executed repeatedly at stable, predictable intervals (1/60th of a second\nby default).",4,null],[11,"update","","Executed on every frame immediately, as fast as the engine will allow.",4,null],[11,"weeks","","Makes a new `Duration` with given number of weeks.\nEquivalent to `Duration::seconds(weeks * 7 * 24 * 60 * 60)` with overflow checks.\nPanics when the duration is out of bounds.",5,{"inputs":[{"name":"i64"}],"output":{"name":"duration"}}],[11,"days","","Makes a new `Duration` with given number of days.\nEquivalent to `Duration::seconds(days * 24 * 60 * 60)` with overflow checks.\nPanics when the duration is out of bounds.",5,{"inputs":[{"name":"i64"}],"output":{"name":"duration"}}],[11,"hours","","Makes a new `Duration` with given number of hours.\nEquivalent to `Duration::seconds(hours * 60 * 60)` with overflow checks.\nPanics when the duration is out of bounds.",5,{"inputs":[{"name":"i64"}],"output":{"name":"duration"}}],[11,"minutes","","Makes a new `Duration` with given number of minutes.\nEquivalent to `Duration::seconds(minutes * 60)` with overflow checks.\nPanics when the duration is out of bounds.",5,{"inputs":[{"name":"i64"}],"output":{"name":"duration"}}],[11,"seconds","","Makes a new `Duration` with given number of seconds.\nPanics when the duration is more than `i64::MAX` milliseconds\nor less than `i64::MIN` milliseconds.",5,{"inputs":[{"name":"i64"}],"output":{"name":"duration"}}],[11,"milliseconds","","Makes a new `Duration` with given number of milliseconds.",5,{"inputs":[{"name":"i64"}],"output":{"name":"duration"}}],[11,"microseconds","","Makes a new `Duration` with given number of microseconds.",5,{"inputs":[{"name":"i64"}],"output":{"name":"duration"}}],[11,"nanoseconds","","Makes a new `Duration` with given number of nanoseconds.",5,{"inputs":[{"name":"i64"}],"output":{"name":"duration"}}],[11,"span","","Runs a closure, returning the duration of time it took to run the\nclosure.",5,{"inputs":[{"name":"f"}],"output":{"name":"duration"}}],[11,"num_weeks","","Returns the total number of whole weeks in the duration.",5,null],[11,"num_days","","Returns the total number of whole days in the duration.",5,null],[11,"num_hours","","Returns the total number of whole hours in the duration.",5,null],[11,"num_minutes","","Returns the total number of whole minutes in the duration.",5,null],[11,"num_seconds","","Returns the total number of whole seconds in the duration.",5,null],[11,"num_milliseconds","","Returns the total number of whole milliseconds in the duration,",5,null],[11,"num_microseconds","","Returns the total number of whole microseconds in the duration,\nor `None` on overflow (exceeding 2^63 microseconds in either direction).",5,null],[11,"num_nanoseconds","","Returns the total number of whole nanoseconds in the duration,\nor `None` on overflow (exceeding 2^63 nanoseconds in either direction).",5,null],[11,"checked_add","","Add two durations, returning `None` if overflow occurred.",5,null],[11,"checked_sub","","Subtract two durations, returning `None` if overflow occurred.",5,null],[11,"min_value","","The minimum possible `Duration`: `i64::MIN` milliseconds.",5,{"inputs":[],"output":{"name":"duration"}}],[11,"max_value","","The maximum possible `Duration`: `i64::MAX` milliseconds.",5,{"inputs":[],"output":{"name":"duration"}}],[11,"zero","","A duration where the stored seconds and nanoseconds are equal to zero.",5,{"inputs":[],"output":{"name":"duration"}}],[11,"is_zero","","Returns `true` if the duration equals `Duration::zero()`.",5,null],[11,"from_std","","Creates a `time::Duration` object from `std::time::Duration`",5,{"inputs":[{"name":"duration"}],"output":{"name":"result"}}],[11,"to_std","","Creates a `std::time::Duration` object from `time::Duration`",5,null],[11,"fmt","","",5,null],[11,"cmp","","",5,null],[11,"partial_cmp","","",5,null],[11,"lt","","",5,null],[11,"le","","",5,null],[11,"gt","","",5,null],[11,"ge","","",5,null],[11,"eq","","",5,null],[11,"ne","","",5,null],[11,"clone","","",5,null],[11,"neg","","",5,null],[11,"add","","",5,null],[11,"sub","","",5,null],[11,"mul","","",5,null],[11,"div","","",5,null],[11,"fmt","","",5,null],[11,"fmt","","",6,null],[11,"eq","","",6,null],[11,"ne","","",6,null],[11,"cmp","","",6,null],[11,"partial_cmp","","",6,null],[11,"lt","","",6,null],[11,"le","","",6,null],[11,"gt","","",6,null],[11,"ge","","",6,null],[11,"clone","","",6,null],[11,"now","","Returns a `SteadyTime` representing the current moment in time.",6,{"inputs":[],"output":{"name":"steadytime"}}],[11,"fmt","","",6,null],[11,"sub","","",6,null],[11,"sub","","",6,null],[11,"add","","",6,null],[11,"on_start","","Executed when the game state begins.",4,null],[11,"on_stop","","Executed when the game state exits.",4,null],[11,"on_pause","","Executed when a different game state is pushed onto the stack.",4,null],[11,"on_resume","","Executed when the application returns to this game state once again.",4,null],[11,"handle_events","","Executed on every frame before updating, for use in reacting to events.",4,null],[11,"fixed_update","","Executed repeatedly at stable, predictable intervals (1/60th of a second\nby default).",4,null],[11,"update","","Executed on every frame immediately, as fast as the engine will allow.",4,null]],"paths":[[4,"Trans"],[3,"Application"],[3,"StateMachine"],[3,"Stopwatch"],[8,"State"],[3,"Duration"],[3,"SteadyTime"]]}; initSearch(searchIndex);