Skip to main content

Resolver

Struct Resolver 

Source
pub struct Resolver { /* private fields */ }

Implementations§

Source§

impl Resolver

Source

pub fn new(root: SourceRoot) -> Resolver

Source

pub fn with_library_paths(self, paths: Vec<PathBuf>) -> Resolver

Source

pub fn root(&self) -> &SourceRoot

Source

pub fn ld_cache(&self) -> Option<&LdCache>

Source

pub fn notes(&self) -> &[ResolutionNote]

Libraries that resolved through something the bundle does not reproduce.

Source

pub fn logical_of_host(&self, host: &Path) -> PathBuf

Map a host path to its logical path inside the source root.

Source

pub fn closure( &mut self, binary: &Path, install: &Path, ) -> Result<DependencyGraph>

Build the full runtime closure of an executable.

binary is a host path; install is where the executable will live in the generated rootfs. Every other object keeps its original location.

Source

pub fn resolve_extra_library( &mut self, soname: &str, architecture: Architecture, requester: &Path, ) -> Result<Option<ResolvedLibrary>>

Resolve a soname that is already known to be a library the policy wants, e.g. NSS modules pulled in by runtime policy rather than by DT_NEEDED.

Source

pub fn attach_library( &mut self, graph: &mut DependencyGraph, library: &ResolvedLibrary, from: NodeId, reason: DependencyReason, ) -> Result<NodeId>

Add an already-resolved object (and its own DT_NEEDED closure) to a graph.

Trait Implementations§

Source§

impl Debug for Resolver

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl DynamicLinkerResolver for Resolver

Source§

fn resolve(&mut self, request: &LibraryRequest) -> Result<ResolvedLibrary>

One DT_NEEDED lookup: a soname is either a path or a search, and a search finds a compatible object, an incompatible one, or nothing.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.