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

Method from_file

alpm-common/src/traits/metadata_file.rs:35–40  ·  view source on GitHub ↗

Creates [`Self`] from file. # Note Implementations of this function are expected to automatically detect a [`FileFormatSchema`] that the resulting [`Self`] is based on. The blanket implementation calls [`Self::from_file_with_schema`] with [`None`] as `schema`.

(file: impl AsRef<Path>)

Source from the content-addressed store, hash-verified

33 ///
34 /// The blanket implementation calls [`Self::from_file_with_schema`] with [`None`] as `schema`.
35 fn from_file(file: impl AsRef<Path>) -> Result<Self, Self::Err>
36 where
37 Self: Sized,
38 {
39 Self::from_file_with_schema(file, None)
40 }
41
42 /// Creates [`Self`] from `file`, optionally validated by a `schema`.
43 ///

Callers

nothing calls this directly

Implementers 8

mod.rsalpm-buildinfo/src/build_info/mod.rs
mod.rsalpm-repo-db/src/files/mod.rs
file.rsalpm-repo-db/src/desc/file.rs
mod.rsalpm-mtree/src/mtree/mod.rs
mod.rsalpm-srcinfo/src/source_info/mod.rs
mod.rsalpm-db/src/files/mod.rs
file.rsalpm-db/src/desc/file.rs
mod.rsalpm-pkginfo/src/package_info/mod.rs

Calls

no outgoing calls

Tested by

no test coverage detected