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: SharedLibraryPrefix
The lookup prefix for shared objects.
directory: AbsolutePath
The 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()?);
Sourcepub fn parser(input: &mut &str) -> ModalResult<Self>
pub fn parser(input: &mut &str) -> ModalResult<Self>
Parses a SonameLookupDirectory
from a string slice.
Consumes all of its input.
See SonameLookupDirectory::from_str
for more details.
Trait Implementations§
Source§impl Clone for SonameLookupDirectory
impl Clone for SonameLookupDirectory
Source§fn clone(&self) -> SonameLookupDirectory
fn clone(&self) -> SonameLookupDirectory
Returns a duplicate of the value. Read more
1.0.0 · 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 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>,
Deserialize this value from the given Serde deserializer. Read more
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.
§Errors
Returns an error if input
can not be converted into a SonameLookupDirectory
.
§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 PartialEq for SonameLookupDirectory
impl PartialEq for SonameLookupDirectory
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 UnwindSafe for SonameLookupDirectory
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