(
s: &str,
schema: Option<SourceInfoSchema>,
)
| 21 | #[pyfunction] |
| 22 | #[pyo3(signature = (s, schema = None))] |
| 23 | pub fn source_info_from_str( |
| 24 | s: &str, |
| 25 | schema: Option<SourceInfoSchema>, |
| 26 | ) -> Result<SourceInfo, crate::srcinfo::error::Error> { |
| 27 | let schema: Option<alpm_srcinfo::SourceInfoSchema> = schema.map(From::from); |
| 28 | let inner = alpm_srcinfo::SourceInfo::from_str_with_schema(s, schema)?; |
| 29 | Ok(inner.into()) |
| 30 | } |
| 31 | |
| 32 | #[pyfunction] |
| 33 | #[pyo3(signature = (path, schema = None))] |
no outgoing calls