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

Method new

python-alpm/src/srcinfo/schema.rs:15–20  ·  view source on GitHub ↗
(version: SchemaVersionOrStr)

Source from the content-addressed store, hash-verified

13impl SourceInfoSchema {
14 #[new]
15 fn new(version: SchemaVersionOrStr) -> PyResult<SourceInfoSchema> {
16 let schema_version: alpm_types::SchemaVersion = version.try_into()?;
17 let inner = alpm_srcinfo::SourceInfoSchema::try_from(schema_version)
18 .map_err(crate::srcinfo::error::Error::from)?;
19 Ok(inner.into())
20 }
21
22 #[staticmethod]
23 fn derive_from_str(srcinfo: &str) -> Result<Self, crate::srcinfo::error::Error> {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected