pub struct CompatibilityIndex {
pub data: HashMap<String, LicenseEntry>,
}Fields§
§data: HashMap<String, LicenseEntry>Implementations§
Source§impl CompatibilityIndex
impl CompatibilityIndex
pub fn new() -> CompatibilityIndex
pub fn add(&mut self, key: &str, classification: LicenseEntry)
pub fn get(&self, key: &str) -> Option<&LicenseEntry>
pub fn get_all(&self, keys: &Vec<&str>) -> Vec<Option<&LicenseEntry>>
pub fn load_from_memory(&mut self, raw: &[u8])
pub fn from_memory(raw: &[u8]) -> CompatibilityIndex
pub fn load_from_file(&mut self, path: &str)
pub fn from_file(path: &str) -> CompatibilityIndex
pub fn save_to_file(&self, path: &str)
pub fn check_compliancy( &self, leading_license: &str, subordinate_licenses: &Vec<&str>, ) -> CompliancyStatus
Trait Implementations§
Source§impl Clone for CompatibilityIndex
impl Clone for CompatibilityIndex
Source§fn clone(&self) -> CompatibilityIndex
fn clone(&self) -> CompatibilityIndex
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CompatibilityIndex
impl Debug for CompatibilityIndex
Source§impl<'de> Deserialize<'de> for CompatibilityIndex
impl<'de> Deserialize<'de> for CompatibilityIndex
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for CompatibilityIndex
impl RefUnwindSafe for CompatibilityIndex
impl Send for CompatibilityIndex
impl Sync for CompatibilityIndex
impl Unpin for CompatibilityIndex
impl UnsafeUnpin for CompatibilityIndex
impl UnwindSafe for CompatibilityIndex
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