pub struct RPMBuilder { /* private fields */ }Expand description
Builder pattern for a full rpm file.
Prefered method of creating a rpm file.
Implementations§
Source§impl RPMBuilder
impl RPMBuilder
pub fn new( name: &str, version: &str, license: &str, arch: &str, desc: &str, ) -> Self
pub fn epoch(self, epoch: i32) -> Self
pub fn compression(self, comp: Compressor) -> Self
pub fn add_changelog_entry<E, F>(self, author: E, entry: F, time: i32) -> Self
pub async fn with_file_async<T, P>( self, source: P, options: T, ) -> Result<Self, RPMError>
pub fn with_file<T, P>(self, source: P, options: T) -> Result<Self, RPMError>
pub fn pre_install_script<T: Into<String>>(self, content: T) -> Self
pub fn post_install_script<T: Into<String>>(self, content: T) -> Self
pub fn pre_uninstall_script<T: Into<String>>(self, content: T) -> Self
pub fn post_uninstall_script<T: Into<String>>(self, content: T) -> Self
pub fn release<T: ToString>(self, release: T) -> Self
pub fn requires(self, dep: Dependency) -> Self
pub fn obsoletes(self, dep: Dependency) -> Self
pub fn conflicts(self, dep: Dependency) -> Self
pub fn provides(self, dep: Dependency) -> Self
Sourcepub fn build(self) -> Result<RPMPackage, RPMError>
pub fn build(self) -> Result<RPMPackage, RPMError>
build without a signature
ignores a present key, if any
Sourcepub fn build_and_sign<S>(self, signer: S) -> Result<RPMPackage, RPMError>
pub fn build_and_sign<S>(self, signer: S) -> Result<RPMPackage, RPMError>
use an external signer to sing and build
See signature::Signing for more details.
Auto Trait Implementations§
impl Freeze for RPMBuilder
impl RefUnwindSafe for RPMBuilder
impl Send for RPMBuilder
impl !Sync for RPMBuilder
impl Unpin for RPMBuilder
impl UnwindSafe for RPMBuilder
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more