pub struct DependencyPolicy {
pub allow: Option<Vec<String>>,
}Expand description
Allow-list of shared libraries the build is permitted to depend on.
Fields§
§allow: Option<Vec<String>>None disables the check entirely; Some enforces the list.
Implementations§
Source§impl DependencyPolicy
impl DependencyPolicy
pub fn allow_all() -> DependencyPolicy
pub fn allow_list(list: Vec<String>) -> DependencyPolicy
Sourcepub fn is_allowed(&self, soname: &str, path: &Path) -> bool
pub fn is_allowed(&self, soname: &str, path: &Path) -> bool
A library is identified by its DT_SONAME when present, otherwise by
file name, which is what a user would write on the command line.
Trait Implementations§
Source§impl Clone for DependencyPolicy
impl Clone for DependencyPolicy
Source§fn clone(&self) -> DependencyPolicy
fn clone(&self) -> DependencyPolicy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DependencyPolicy
impl Debug for DependencyPolicy
Source§impl Default for DependencyPolicy
impl Default for DependencyPolicy
Source§fn default() -> DependencyPolicy
fn default() -> DependencyPolicy
Returns the “default value” for a type. Read more
impl Eq for DependencyPolicy
Source§impl PartialEq for DependencyPolicy
impl PartialEq for DependencyPolicy
impl StructuralPartialEq for DependencyPolicy
Auto Trait Implementations§
impl Freeze for DependencyPolicy
impl RefUnwindSafe for DependencyPolicy
impl Send for DependencyPolicy
impl Sync for DependencyPolicy
impl Unpin for DependencyPolicy
impl UnsafeUnpin for DependencyPolicy
impl UnwindSafe for DependencyPolicy
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.