pub struct LangContext<'a> {
pub tools: &'a ToolsConfig,
pub run_wrapper: Option<&'a str>,
pub extra_lint_paths: &'a [String],
pub project_file: Option<&'a str>,
}Expand description
Per-language context passed to every default_*_config function.
Bundles the global [tools] selection plus three optional knobs that
reduce override boilerplate in consumer alef.toml files:
run_wrapper— prefix every default tool invocation, e.g. wrapruff format …withuv run --no-syncso the lint step inherits the project’s package-manager environment without a full override.extra_lint_paths— append additional paths to the default lint commands (format,check,typecheck).project_file— for languages whose tools target a project descriptor (Java’spom.xml, C#’s.csproj/.slnx), use this file instead of the package directory.
Fields§
§tools: &'a ToolsConfig§run_wrapper: Option<&'a str>§extra_lint_paths: &'a [String]§project_file: Option<&'a str>Implementations§
Source§impl<'a> LangContext<'a>
impl<'a> LangContext<'a>
Sourcepub fn default(tools: &'a ToolsConfig) -> Self
pub fn default(tools: &'a ToolsConfig) -> Self
Create a context with all knobs unset (no wrapper, no extra paths, no project file). Useful in tests and call sites that only need the global tools selection.
Trait Implementations§
Source§impl<'a> Clone for LangContext<'a>
impl<'a> Clone for LangContext<'a>
Source§fn clone(&self) -> LangContext<'a>
fn clone(&self) -> LangContext<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<'a> Freeze for LangContext<'a>
impl<'a> RefUnwindSafe for LangContext<'a>
impl<'a> Send for LangContext<'a>
impl<'a> Sync for LangContext<'a>
impl<'a> Unpin for LangContext<'a>
impl<'a> UnsafeUnpin for LangContext<'a>
impl<'a> UnwindSafe for LangContext<'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