MCPcopy Create free account
hub / github.com/archlinux/alpm / new

Method new

python-alpm/src/types/license.rs:12–17  ·  view source on GitHub ↗
(license: &str)

Source from the content-addressed store, hash-verified

10impl License {
11 #[new]
12 fn new(license: &str) -> Result<Self, crate::types::Error> {
13 // This should be infallible, as any non-spdx string is valid as an unknown license.
14 // That's why the error type here is undocumented.
15 let inner = alpm_types::License::new(license.into())?;
16 Ok(inner.into())
17 }
18
19 #[staticmethod]
20 fn from_valid_spdx(identifier: &str) -> Result<Self, crate::types::Error> {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected