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

Method new

python-alpm/src/types/relation.rs:96–103  ·  view source on GitHub ↗
(
        name: &str,
        version: Option<crate::types::version::PackageVersion>,
    )

Source from the content-addressed store, hash-verified

94 #[new]
95 #[pyo3(signature = (name, version = None))]
96 fn new(
97 name: &str,
98 version: Option<crate::types::version::PackageVersion>,
99 ) -> Result<Self, crate::types::Error> {
100 let name = alpm_types::SharedObjectName::new(name)?;
101 let inner = alpm_types::Soname::new(name, version.map(From::from));
102 Ok(inner.into())
103 }
104
105 #[getter]
106 fn name(&self) -> String {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected