pub struct Action<D> {
pub name: &'static str,
pub run: for<'a> fn(_: &'a mut D, _: SmallRng) -> BoxFuture<'a, Result<()>>,
}
Expand description
This structure represents a single action that can be run by an actor. These actions are exposed to the stress test runner over FIDL using the Actor protocol.
Fields§
§name: &'static str
The name of this action, as it will appear to the stress test runner
run: for<'a> fn(_: &'a mut D, _: SmallRng) -> BoxFuture<'a, Result<()>>
The function that will be invoked when this action is asked to execute. This function returns a boxed future that will be awaited on to allow async work to be done.
Auto Trait Implementations§
impl<D> Freeze for Action<D>
impl<D> RefUnwindSafe for Action<D>
impl<D> Send for Action<D>
impl<D> Sync for Action<D>
impl<D> Unpin for Action<D>
impl<D> UnwindSafe for Action<D>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more