pub struct Context {
pub project_root: PathBuf,
pub matched: Vec<String>,
}Expand description
The context the host passes to the plugin. Read-only.
Fields§
§project_root: PathBufProject root. For building log / error messages only – it must not be used to read files, see the constraint list in the crate docs.
matched: Vec<String>The files this detection matched, relative to project_root.
This is the plugin’s only channel for learning “what the project looks like”. Example: the
yarn plugin distinguishes classic from berry via has_matched(".yarnrc.yml") without
reading a single file.
Implementations§
Trait Implementations§
impl Eq for Context
impl StructuralPartialEq for Context
Auto Trait Implementations§
impl Freeze for Context
impl RefUnwindSafe for Context
impl Send for Context
impl Sync for Context
impl Unpin for Context
impl UnsafeUnpin for Context
impl UnwindSafe for Context
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