Struct sorting_visualization::app::App [−][src]
This struct contains all rendering, updating and input handling logic.
Fields
state: SharedState
algorithm_thread: JoinHandle<()>
Implementations
impl App
[src]
pub fn init(
algorithm: Box<dyn Algorithm + Send>,
array: Vec<u32>,
speed: f64
) -> Self
[src]
algorithm: Box<dyn Algorithm + Send>,
array: Vec<u32>,
speed: f64
) -> Self
Creates a new app (with a state constructed from the given array
) and
starts an algorithm thread. This function is called init
instead of
new
because it has side effects.
pub fn render(
&mut self,
args: RenderArgs,
gl: &mut GlGraphics,
glyphs: &mut GlyphCache<'_>
)
[src]
&mut self,
args: RenderArgs,
gl: &mut GlGraphics,
glyphs: &mut GlyphCache<'_>
)
Draws the current state.
pub fn update(&mut self, args: UpdateArgs)
[src]
pub fn button(&mut self, args: ButtonArgs)
[src]
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for App
impl Send for App
impl Sync for App
impl Unpin for App
impl !UnwindSafe for App
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,
pub 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> SetParameter for T
[src]
pub fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
[src]
T: Parameter<Self>,
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.
pub 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>,