pub struct ExecutePorts<'a> {
pub reporter: Reporter<'a>,
pub create_context: Option<ContextFactory<'a>>,
pub observer: Option<Observer<'a>>,
}Expand description
The ports collect_examples/execute_plan need. create_context maps a
step-file to its fresh initial state (None → a unit state per file);
observer is optional per-step instrumentation. The lifetime lets the port
closures borrow caller locals (e.g. a conformance observer’s accumulator).
Fields§
§reporter: Reporter<'a>§create_context: Option<ContextFactory<'a>>§observer: Option<Observer<'a>>Implementations§
Source§impl<'a> ExecutePorts<'a>
impl<'a> ExecutePorts<'a>
Sourcepub fn new(reporter: Box<dyn Fn(&Diagnostic) + 'a>) -> ExecutePorts<'a>
pub fn new(reporter: Box<dyn Fn(&Diagnostic) + 'a>) -> ExecutePorts<'a>
Ports with just a reporter (no context factory, no observer).
Source§impl ExecutePorts<'static>
impl ExecutePorts<'static>
Sourcepub fn silent() -> ExecutePorts<'static>
pub fn silent() -> ExecutePorts<'static>
Ports that discard diagnostics and observe nothing.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for ExecutePorts<'a>
impl<'a> !Send for ExecutePorts<'a>
impl<'a> !Sync for ExecutePorts<'a>
impl<'a> !UnwindSafe for ExecutePorts<'a>
impl<'a> Freeze for ExecutePorts<'a>
impl<'a> Unpin for ExecutePorts<'a>
impl<'a> UnsafeUnpin for ExecutePorts<'a>
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> 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