pub struct Synthetic { /* private fields */ }Expand description
An executor that answers from a caller-supplied function instead of running anything.
Named rather than a blanket impl over FnMut on purpose. The seam
this replaces had exactly such a blanket impl, which meant every
test got a fake without ever choosing one, and the trait looked
exercised while no implementation had ever run a process. Reaching
for a fake is now a thing you can see in the source.
Implementations§
Source§impl Synthetic
impl Synthetic
Sourcepub fn passing() -> Self
pub fn passing() -> Self
An executor whose every verdict is Verdict::Passed.
Sourcepub fn failing_labels(labels: &[&str]) -> Self
pub fn failing_labels(labels: &[&str]) -> Self
An executor that fails exactly the jobs whose label is listed and passes the rest.
The shape most queue tests need: “change 7 breaks the build”.
Trait Implementations§
Source§impl CiExecutor for Synthetic
impl CiExecutor for Synthetic
Source§fn info(&mut self) -> Result<ExecutorInfo, ExecutorError>
fn info(&mut self) -> Result<ExecutorInfo, ExecutorError>
Identity and protocol version. Called once before any job, so a
mismatched provider is refused before it can return a verdict
that means something else than it appears to. Read more
Auto Trait Implementations§
impl Freeze for Synthetic
impl !RefUnwindSafe for Synthetic
impl Send for Synthetic
impl !Sync for Synthetic
impl Unpin for Synthetic
impl UnsafeUnpin for Synthetic
impl !UnwindSafe for Synthetic
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