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

Method try_from

alpm-package/src/package.rs:143–145  ·  view source on GitHub ↗

Creates an [`ExistingAbsoluteDir`] from a [`Path`] reference. Delegates to [`ExistingAbsoluteDir::new`]. # Errors Returns an error if [`ExistingAbsoluteDir::new`] fails.

(value: &Path)

Source from the content-addressed store, hash-verified

141 ///
142 /// Returns an error if [`ExistingAbsoluteDir::new`] fails.
143 fn try_from(value: &Path) -> Result<Self, Self::Error> {
144 Self::new(value.to_path_buf())
145 }
146}
147
148/// Appends relative files from an input directory to a [`TarballBuilder`].

Callers

nothing calls this directly

Calls 13

from_strFunction · 0.85
append_relative_filesFunction · 0.85
output_dirMethod · 0.80
inner_mutMethod · 0.80
mtreeMethod · 0.80
package_inputMethod · 0.80
input_pathsMethod · 0.80
createFunction · 0.50
to_path_bufMethod · 0.45
joinMethod · 0.45
as_pathMethod · 0.45
compressionMethod · 0.45

Tested by

no test coverage detected