Skip to main content

AffectedOptions

Struct AffectedOptions 

Source
pub struct AffectedOptions<'a> {
    pub cwd: PathBuf,
    pub base: String,
    pub language: Language,
    pub patterns: Vec<String>,
    pub extra_changed_files: Vec<String>,
    pub git: &'a dyn GitRunner,
    pub fs: &'a dyn Fs,
    pub import_extractor: Option<&'a dyn ImportExtractor>,
}
Expand description

Inputs and IO seams for resolve_affected.

Fields§

§cwd: PathBuf

Project root (also the search root for bench discovery).

§base: String

Git ref to diff against, e.g. origin/master.

§language: Language§patterns: Vec<String>

Bench-discovery globs. Empty ⇒ use Language::default_globs.

§extra_changed_files: Vec<String>

Extra files to treat as changed. Escape hatch for tests and for cases the parser can’t see (config files, codegen outputs, etc.).

§git: &'a dyn GitRunner§fs: &'a dyn Fs§import_extractor: Option<&'a dyn ImportExtractor>

Per-language import extractor used to derive file edges from a source string. None ⇒ in-crate regex pass (the default, kept for backwards-compatibility with every existing call site). The CLI passes an AST-backed extractor that uses tree-sitter to extract the same shape language-correctly.

Auto Trait Implementations§

§

impl<'a> !RefUnwindSafe for AffectedOptions<'a>

§

impl<'a> !Send for AffectedOptions<'a>

§

impl<'a> !Sync for AffectedOptions<'a>

§

impl<'a> !UnwindSafe for AffectedOptions<'a>

§

impl<'a> Freeze for AffectedOptions<'a>

§

impl<'a> Unpin for AffectedOptions<'a>

§

impl<'a> UnsafeUnpin for AffectedOptions<'a>

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.