pub struct SonameLookupDirectory {
pub prefix: SharedLibraryPrefix,
pub directory: AbsolutePath,
}Expand description
A lookup directory for shared object files.
Follows the alpm-sonamev2 format, which encodes a prefix and a directory.
The same prefix is later used to identify the location of a soname, see
SonameV2.
Fields§
§prefix: SharedLibraryPrefixThe lookup prefix for shared objects.
directory: AbsolutePathThe directory to look for shared objects in.
Implementations§
Source§impl SonameLookupDirectory
impl SonameLookupDirectory
Sourcepub fn new(prefix: SharedLibraryPrefix, directory: AbsolutePath) -> Self
pub fn new(prefix: SharedLibraryPrefix, directory: AbsolutePath) -> Self
Creates a new lookup directory with a prefix and a directory.
§Examples
use alpm_types::SonameLookupDirectory;
SonameLookupDirectory::new("lib".parse()?, "/usr/lib".parse()?);Trait Implementations§
Source§impl Clone for SonameLookupDirectory
impl Clone for SonameLookupDirectory
Source§fn clone(&self) -> SonameLookupDirectory
fn clone(&self) -> SonameLookupDirectory
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SonameLookupDirectory
impl Debug for SonameLookupDirectory
Source§impl<'de> Deserialize<'de> for SonameLookupDirectory
impl<'de> Deserialize<'de> for SonameLookupDirectory
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Display for SonameLookupDirectory
impl Display for SonameLookupDirectory
Source§impl FromStr for SonameLookupDirectory
impl FromStr for SonameLookupDirectory
Source§fn from_str(s: &str) -> Result<Self, Self::Err>
fn from_str(s: &str) -> Result<Self, Self::Err>
Creates a SonameLookupDirectory from a string slice.
Delegates to SonameLookupDirectory::parser_until.
§Errors
Returns an error if SonameLookupDirectory::parser_until fails.
§Examples
use std::str::FromStr;
use alpm_types::SonameLookupDirectory;
let dir = SonameLookupDirectory::from_str("lib:/usr/lib")?;
assert_eq!(dir.to_string(), "lib:/usr/lib");
assert!(SonameLookupDirectory::from_str(":/usr/lib").is_err());
assert!(SonameLookupDirectory::from_str(":/usr/lib").is_err());
assert!(SonameLookupDirectory::from_str("lib:").is_err());Source§impl ParserUntil for SonameLookupDirectory
impl ParserUntil for SonameLookupDirectory
Source§fn parser_until<'a, P>(
delimiter: P,
) -> impl Parser<&'a str, Self, ErrMode<ContextError>>
fn parser_until<'a, P>( delimiter: P, ) -> impl Parser<&'a str, Self, ErrMode<ContextError>>
Parses a SonameLookupDirectory from a string slice.
§Errors
Returns an error, if the parser input does not contain a valid SonameLookupDirectory
before the delimiter.
Source§fn parser_until_eof(input: &mut &str) -> Result<Self, ErrMode<ContextError>>
fn parser_until_eof(input: &mut &str) -> Result<Self, ErrMode<ContextError>>
Source§impl PartialEq for SonameLookupDirectory
impl PartialEq for SonameLookupDirectory
Source§fn eq(&self, other: &SonameLookupDirectory) -> bool
fn eq(&self, other: &SonameLookupDirectory) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for SonameLookupDirectory
impl Serialize for SonameLookupDirectory
impl Eq for SonameLookupDirectory
impl StructuralPartialEq for SonameLookupDirectory
Auto Trait Implementations§
impl Freeze for SonameLookupDirectory
impl RefUnwindSafe for SonameLookupDirectory
impl Send for SonameLookupDirectory
impl Sync for SonameLookupDirectory
impl Unpin for SonameLookupDirectory
impl UnsafeUnpin for SonameLookupDirectory
impl UnwindSafe for SonameLookupDirectory
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<U> ParserUntilInclusive for Uwhere
U: ParserUntil,
impl<U> ParserUntilInclusive for Uwhere
U: ParserUntil,
Source§fn parser_until_inclusive<'a, P>(
delimiter: P,
) -> impl Parser<&'a str, U, ErrMode<ContextError>>
fn parser_until_inclusive<'a, P>( delimiter: P, ) -> impl Parser<&'a str, U, ErrMode<ContextError>>
Returns a [Parser] that parses the whole input and consumes the given delimiter parser.
Delegates to ParserUntil::parser_until and consumes the delimiter.