melodium-common 0.10.1

Common Mélodium elements and traits
Documentation
1
2
3
4
5
6
7
8
9
10
11
use crate::descriptor::{Collection, Loader, LoadingResult, PackageRequirement, Version};
use core::{any::Any, fmt::Debug};
use std::collections::HashMap;

pub trait Package: Debug + Any + Send + Sync {
    fn name(&self) -> &str;
    fn version(&self) -> &Version;
    fn requirements(&self) -> &Vec<PackageRequirement>;
    fn collection(&self, loader: &dyn Loader) -> LoadingResult<Collection>;
    fn embedded(&self) -> &HashMap<&'static str, &'static [u8]>;
}