[][src]Struct pushrod::engine::Engine

pub struct Engine { /* fields omitted */ }

This is a Pushrod main loop struct. All of the members of this object are private, and used to track interaction with widgets on the screen, and other SDL2-related events.

Implementations

impl Engine[src]

This is an implementation of Pushrod, the main loop handler. Multiple Pushrods can be created for multiple windows if your application provides more than one window with which to interact.

pub fn new(handler: Box<dyn EventHandler>, window: &Window) -> Self[src]

Creates a new Pushrod run loop, taking a reference to the EventHandler that handles run loop events for this Window.

pub fn stop(&mut self)[src]

Stops the Pushrod run loop.

pub fn get_cache(&mut self) -> &mut WidgetCache[src]

Retrieves the WidgetCache.

pub fn run(&mut self, sdl: Sdl, window: Window)[src]

This is the main event handler for the application. It handles all of the events generated by the SDL2 manager, and translates them into events that can be used by the handle_event method.

Auto Trait Implementations

impl !RefUnwindSafe for Engine

impl !Send for Engine

impl !Sync for Engine

impl Unpin for Engine

impl !UnwindSafe for Engine

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.