pub trait Framework: Send + Sync {
// Required methods
fn name(&self) -> &str;
fn files(&self) -> &[&str];
fn install_command(&self, packager: &str) -> &str;
fn build_command(&self, packager: &str) -> &str;
fn output_directory(&self) -> &str;
fn parents(&self) -> usize;
// Provided methods
fn packages(&self) -> &[&str] { ... }
fn config_files(&self) -> &[&str] { ... }
fn adapter(&self, config: &[u8]) -> Option<Adapter> { ... }
}Expand description
A web framework, recognised by its configuration files and the packages a project depends on.
PHP: Utopia\Detector\Detection\Framework.
Required Methods§
Sourcefn files(&self) -> &[&str]
fn files(&self) -> &[&str]
The file names that reveal it, such as next.config.js.
PHP: getFiles().
Sourcefn install_command(&self, packager: &str) -> &str
fn install_command(&self, packager: &str) -> &str
The command that installs dependencies with packager (npm,
pnpm, yarn; anything else, or empty, as pnpm).
PHP: getInstallCommand(), with the packager setPackager() set.
Sourcefn build_command(&self, packager: &str) -> &str
fn build_command(&self, packager: &str) -> &str
The command that builds with packager.
PHP: getBuildCommand(), with the packager setPackager() set.
Sourcefn output_directory(&self) -> &str
fn output_directory(&self) -> &str
Where the build writes its output, such as ./.next.
PHP: getOutputDirectory().
Provided Methods§
Sourcefn packages(&self) -> &[&str]
fn packages(&self) -> &[&str]
The dependencies that reveal it, such as next.
PHP: getPackages().
Sourcefn config_files(&self) -> &[&str]
fn config_files(&self) -> &[&str]
The configuration files to read for Framework::adapter, in
priority order.
PHP: getConfigFiles().
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".