pub fn update<F, R>(&mut self, func: F) -> R
    where
        F: for<'a, 'gc, 'gc_context> FnOnce(&mut UpdateContext<'a, 'gc, 'gc_context>) -> R,
    {
        let rval = self.mutate_with_update_context(|context| {
            let rval = func(context);

            Self::run_actions(context);

            rval
        });

        // Update mouse state (check for new hovered button, etc.)
        self.update_drag();
        self.update_roll_over();

        // GC
        self.gc_arena.collect_debt();

        rval
    }
/// Update the current state of the player.
///
/// The given function will be called with the current stage root, current
/// mouse hover node, AVM, and an update context.
///
/// This particular function runs necessary post-update bookkeeping, such
/// as executing any actions queued on the update context, keeping the
/// hover state up to date, and running garbage collection.
Update the current state of the player.
The given function will be called with the current stage root, current
mouse hover node, AVM, and an update context.

This particular function runs necessary post-update bookkeeping, such
as executing any actions queued on the update context, keeping the
hover state up to date, and running garbage collection.
Update the current state of the player . The given function will be called with the current stage root current mouse hover node AVM and an update context . This particular function runs necessary post - update bookkeeping such as executing any actions queued on the update context keeping the hover state up to date and running garbage collection .
pub fn update<F, R>(&mut self, func: F) -> R
    where
        F: for<'a, 'gc, 'gc_context> FnOnce(&mut UpdateContext<'a, 'gc, 'gc_context>) -> R,
    {
        let rval = self.mutate_with_update_context(|context| {
            let rval = func(context);
            Self::run_actions(context);
            rval
        });
        // Update mouse state (check for new hovered button, etc.)
        self.update_drag();
        self.update_roll_over();
        // GC
        self.gc_arena.collect_debt();
        rval
    }
pub fn update < F , R > ( & mut self , func : F ) -> R where F : for < ' a , ' gc , ' gc_context > FnOnce ( & mut UpdateContext < ' a , ' gc , ' gc_context > ) -> R , { let rval = self . mutate_with_update_context ( | context | { let rval = func ( context ) ; Self :: run_actions ( context ) ; rval } ) ; // Update mouse state (check for new hovered button, etc.) self . update_drag ( ) ; self . update_roll_over ( ) ; // GC self . gc_arena . collect_debt ( ) ; rval }
Update the current state of the player.
Update the current state of the player .
&mut self
func
F
&mut self
func
F