From c528265f1a8ba03ca882f8ef60e98ad27c01a488 Mon Sep 17 00:00:00 2001 From: Szpachlarz Date: Fri, 15 Nov 2024 19:21:43 +0000 Subject: [PATCH] docs(interactor): document activity.rs --- src/interactor/activity.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/interactor/activity.rs b/src/interactor/activity.rs index fb72eed..a29008c 100644 --- a/src/interactor/activity.rs +++ b/src/interactor/activity.rs @@ -18,11 +18,13 @@ use crate::{ stepper::{Abort, Step}, }; +/// Stores the interactive input data from the user pub struct InteractiveInput { pub pointer_pos: Point, pub dt: f32, } +/// This is the execution context passed to the stepper on each step pub struct ActivityContext<'a, M: AccessMesadata> { pub interactive_input: &'a InteractiveInput, pub invoker: &'a mut Invoker, @@ -36,6 +38,7 @@ pub enum ActivityError { Invoker(#[from] InvokerError), } +/// An activity is either an interaction or an execution pub enum ActivityStepper { Interaction(InteractionStepper), Execution(ExecutionStepper), @@ -106,6 +109,7 @@ impl GetObstacles for ActivityStepper { } } +/// An ActivityStepper that preserves its status pub struct ActivityStepperWithStatus { activity: ActivityStepper, maybe_status: Option>,