pub struct ExamplesAnalyzer { /* private fields */ }Expand description
ExamplesAnalyzer — enforces compile_failure.
Strategy: shell out to cargo check --examples --message-format=json, parse
the JSON message stream, and surface every compiler-message with level
error that points at a file under examples/.
This is deterministic by definition: if cargo says it doesn’t compile, the example is drifting from the library’s current API.
Implementations§
Source§impl ExamplesAnalyzer
impl ExamplesAnalyzer
Sourcepub fn with_runner(runner: Box<dyn CargoRunner>) -> Self
pub fn with_runner(runner: Box<dyn CargoRunner>) -> Self
Construct an analyzer with a custom runner (used by tests).
Trait Implementations§
Source§impl Default for ExamplesAnalyzer
impl Default for ExamplesAnalyzer
Source§impl DriftAnalyzer for ExamplesAnalyzer
impl DriftAnalyzer for ExamplesAnalyzer
fn id(&self) -> &'static str
fn analyze(&self, ctx: &ProjectContext) -> Vec<Divergence>
Auto Trait Implementations§
impl Freeze for ExamplesAnalyzer
impl !RefUnwindSafe for ExamplesAnalyzer
impl Send for ExamplesAnalyzer
impl Sync for ExamplesAnalyzer
impl Unpin for ExamplesAnalyzer
impl UnsafeUnpin for ExamplesAnalyzer
impl !UnwindSafe for ExamplesAnalyzer
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