Skip to main content

TestBodies

Struct TestBodies 

Source
pub struct TestBodies { /* private fields */ }
Expand description

Test bodies of at least min_lines start collapsed on both sides, paired or not, so a diff reads as the code under test first. A whole test module, such as a Rust #[cfg(test)] mod tests, collapses as one fold labelled “test module”; the header stays visible and the fold expands like any other. A test body is linked to its docstring, which collapses with it.

Trait Implementations§

Source§

impl Plugin for TestBodies

Source§

type Options = Options

The plugin’s options, deserialized from its bundled or external config entry: a JSON object, validated against the options schema in plugin.toml and filled with its defaults.
Source§

fn new(options: Options) -> Result<Self>

Make the plugin from its options. An error, like options that do not deserialize, is a setup error naming the plugin.
Source§

fn queries(&self) -> Result<Vec<QuerySource>>

Named query text, collected once during setup and compiled by diffr.
Source§

fn classify(&self, _file: &FileEntry) -> Result<Vec<String>>

Tags to add to the file’s manifest entry before it is diffed. A plugin that does not classify returns none.
Source§

fn mutate( &self, _file: &FileEntry, sides: &Pairing<Source>, ) -> Result<Vec<Move>>

The moves that shape how the diffed file starts out. sides are the sides the file has, already rebuilt as trees.
Source§

fn enrich( &self, _file: &FileEntry, _sides: &Pairing<Source>, ) -> Result<Vec<Annotation>, Error>

Deferred labels for stable region IDs, after all initial mutations.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Resource for T
where T: 'static,

Source§

type Rep = Option<T>

The type which is actually stored in-memory for this resource. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.