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
Source§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more