pub trait LanguagePlugin: Sync {
Show 16 methods
// Required methods
fn extensions(&self) -> Vec<String>;
fn lower(
&self,
path: &RepoPath,
text: &str,
dialect: Option<&str>,
) -> Result<FileModel, LowerError>;
fn reference_ranges(&self) -> Result<ReferenceRanges, LanguagePluginError>;
// Provided methods
fn known_dialects(&self) -> Vec<String> { ... }
fn flagged_line_rules(&self) -> Vec<String> { ... }
fn manifest_paths(
&self,
_repository_paths: &[RepoPath],
) -> Result<Vec<String>, LanguagePluginError> { ... }
fn analyze_manifests(
&self,
_manifests: Vec<Manifest>,
) -> Result<ManifestAnalysis, LanguagePluginError> { ... }
fn resolve_imports(
&self,
_repository_paths: &[RepoPath],
_manifests: Vec<Manifest>,
_requests: Vec<ImportRequest>,
_package_profiles: &[PackageFrameworkProfiles],
) -> Result<Vec<Resolution>, LanguagePluginError> { ... }
fn entry_points(
&self,
_repository_paths: &[RepoPath],
_manifests: Vec<Manifest>,
) -> Result<Vec<RepoPath>, LanguagePluginError> { ... }
fn known_framework_profiles(&self) -> Vec<String> { ... }
fn resolve_framework_profiles(
&self,
_package_root: &str,
_files: &[RepoPath],
_manifests: Vec<Manifest>,
_selection: FrameworkProfileSelection,
) -> Result<FrameworkProfileResult, LanguagePluginError> { ... }
fn has_hazard_rules(&self) -> bool { ... }
fn hazard_rules(&self) -> Vec<String> { ... }
fn has_imports(&self) -> bool { ... }
fn has_scope_analysis(&self) -> bool { ... }
fn analyze_scope(
&self,
_package_root: &str,
_dialect: Option<&str>,
_artifacts: Vec<FileScopeArtifact>,
) -> Result<ScopeAnalysis, LanguagePluginError> { ... }
}Required Methods§
fn extensions(&self) -> Vec<String>
fn lower( &self, path: &RepoPath, text: &str, dialect: Option<&str>, ) -> Result<FileModel, LowerError>
fn reference_ranges(&self) -> Result<ReferenceRanges, LanguagePluginError>
Provided Methods§
fn known_dialects(&self) -> Vec<String>
fn flagged_line_rules(&self) -> Vec<String>
fn manifest_paths( &self, _repository_paths: &[RepoPath], ) -> Result<Vec<String>, LanguagePluginError>
fn analyze_manifests( &self, _manifests: Vec<Manifest>, ) -> Result<ManifestAnalysis, LanguagePluginError>
fn resolve_imports( &self, _repository_paths: &[RepoPath], _manifests: Vec<Manifest>, _requests: Vec<ImportRequest>, _package_profiles: &[PackageFrameworkProfiles], ) -> Result<Vec<Resolution>, LanguagePluginError>
fn entry_points( &self, _repository_paths: &[RepoPath], _manifests: Vec<Manifest>, ) -> Result<Vec<RepoPath>, LanguagePluginError>
fn known_framework_profiles(&self) -> Vec<String>
fn resolve_framework_profiles( &self, _package_root: &str, _files: &[RepoPath], _manifests: Vec<Manifest>, _selection: FrameworkProfileSelection, ) -> Result<FrameworkProfileResult, LanguagePluginError>
fn has_hazard_rules(&self) -> bool
fn hazard_rules(&self) -> Vec<String>
fn has_imports(&self) -> bool
fn has_scope_analysis(&self) -> bool
fn analyze_scope( &self, _package_root: &str, _dialect: Option<&str>, _artifacts: Vec<FileScopeArtifact>, ) -> Result<ScopeAnalysis, LanguagePluginError>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".