pub struct VirtualModuleProviderRule {
pub plugin: String,
pub scope: String,
pub matcher: VirtualModuleMatch,
pub package: String,
}Expand description
One import-specifier rule crediting the package that provides a plugin’s
virtual or generated modules. See Plugin::virtual_module_package.
Fields§
§plugin: StringThe plugin that declares the package.
scope: StringThe project-relative root of the package the plugin is active in. Empty for the project root.
matcher: VirtualModuleMatchThe specifier matcher a virtual-module or generated-import entry of the plugin contributed.
package: StringThe package a matched import credits.
Implementations§
Source§impl VirtualModuleProviderRule
impl VirtualModuleProviderRule
Sourcepub fn matches(&self, root: &Path, path: &Path, specifier: &str) -> bool
pub fn matches(&self, root: &Path, path: &Path, specifier: &str) -> bool
Whether this rule covers specifier written in the file at path.
A rule applies only to the files under the package root where its plugin is active, so a virtual-module import in another workspace credits no package. A match hides an unused package, so the match is narrower than the unresolved-import filter.
Trait Implementations§
Source§impl Clone for VirtualModuleProviderRule
impl Clone for VirtualModuleProviderRule
Source§impl Debug for VirtualModuleProviderRule
impl Debug for VirtualModuleProviderRule
impl Eq for VirtualModuleProviderRule
impl StructuralPartialEq for VirtualModuleProviderRule
Auto Trait Implementations§
impl Forget for VirtualModuleProviderRule
impl Freeze for VirtualModuleProviderRule
impl Move for VirtualModuleProviderRule
impl RefUnwindSafe for VirtualModuleProviderRule
impl Send for VirtualModuleProviderRule
impl Sync for VirtualModuleProviderRule
impl Unpin for VirtualModuleProviderRule
impl UnsafeUnpin for VirtualModuleProviderRule
impl UnwindSafe for VirtualModuleProviderRule
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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