[−][src]Enum pkgsrc::plist::PlistEntry
A single plist entry.
Entries can be constructed either by using from_bytes()
to parse an
array of bytes from a plist, or by constructing one of the entries manually.
Examples
use pkgsrc::plist::{Result,PlistEntry}; use std::ffi::OsString; fn main() -> Result<()> { /* * Entries differ in whether they take String or OsString arguments and * whether or not they are wrapped in Option, check the documentation! */ let p1 = PlistEntry::from_bytes(String::from("@comment hi").as_bytes())?; let p2 = PlistEntry::Comment(Some(OsString::from("hi"))); assert_eq!(p1, p2); Ok(()) }
Variants
File(OsString)
Filename to extract relative to the current working directory.
Cwd(OsString)
Set the internal directory pointer. All subsequent filenames will be assumed relative to this directory.
Exec(OsString)
Execute command as part of the unpacking process.
UnExec(OsString)
Execute command as part of the deinstallation process.
Set default permission for all subsequently extracted files.
PkgOpt(PlistOption)
Set internal package options. Named Opt to avoid conflict with Rust "Option".
Set default ownership for all subsequently extracted files to specified user.
Set default group ownership for all subsequently extracted files to specified group.
Embed a comment in the packing list. While specified as mandatory in
the manual page, in practise it is not (e.g. print-PLIST
).
Used internally to tell extraction to ignore the next file.
Name(String)
Set the name of the package.
PkgDir(OsString)
Declare directory name as managed.
DirRm(OsString)
If directory name exists, it will be deleted at deinstall time.
Display(OsString)
Declare name as the file to be displayed at install time.
PkgDep(String)
Declare a dependency on the pkgname package.
BldDep(String)
Declare that this package was built with the exact version of pkgname.
PkgCfl(String)
Declare a conflict with the pkgcflname package.
Methods
impl PlistEntry
[src]
pub fn from_bytes(bytes: &[u8]) -> Result<PlistEntry>
[src]
Construct a new PlistEntry
from a stream of bytes representing a
line from a package list.
Trait Implementations
impl Eq for PlistEntry
[src]
impl PartialEq<PlistEntry> for PlistEntry
[src]
fn eq(&self, other: &PlistEntry) -> bool
[src]
fn ne(&self, other: &PlistEntry) -> bool
[src]
impl Debug for PlistEntry
[src]
Auto Trait Implementations
impl Send for PlistEntry
impl Unpin for PlistEntry
impl Sync for PlistEntry
impl UnwindSafe for PlistEntry
impl RefUnwindSafe for PlistEntry
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,