pub trait AsyncRobot {
// Provided methods
fn opcontrol(&mut self) -> impl Future<Output = Result> { ... }
fn auto(&mut self) -> impl Future<Output = Result> { ... }
fn disabled(&mut self) -> impl Future<Output = Result> { ... }
fn comp_init(&mut self) -> impl Future<Output = Result> { ... }
}
Expand description
A trait for robot code that spins up the pros-rs async executor. This is the preferred trait to run robot code.
Provided Methods§
Sourcefn opcontrol(&mut self) -> impl Future<Output = Result>
fn opcontrol(&mut self) -> impl Future<Output = Result>
Runs during the operator control period.
This function may be called more than once.
For that reason, do not use Peripherals::take
in this function.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.