refactor: rename aim to upm and extract appimage module
This commit is contained in:
parent
af13e98eb3
commit
863c57e473
117 changed files with 2622 additions and 887 deletions
19
crates/upm-core/src/adapters/mod.rs
Normal file
19
crates/upm-core/src/adapters/mod.rs
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
pub mod direct_url;
|
||||
pub mod github;
|
||||
pub mod gitlab;
|
||||
pub mod sourceforge;
|
||||
pub mod test_support;
|
||||
pub mod traits;
|
||||
pub mod zsync;
|
||||
|
||||
use crate::adapters::traits::SourceAdapter;
|
||||
use crate::domain::source::SourceRef;
|
||||
|
||||
pub fn all_adapter_kinds() -> Vec<&'static str> {
|
||||
vec!["github", "gitlab", "direct-url", "zsync", "sourceforge"]
|
||||
}
|
||||
|
||||
pub fn supports_source<A: SourceAdapter + ?Sized>(adapter: &A, source: &SourceRef) -> bool {
|
||||
adapter.repository_source_kind() == Some(source.kind)
|
||||
|| adapter.exact_source_kind() == Some(source.kind)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue