pub struct Package { /* private fields */ }Implementations§
Source§impl Package
impl Package
pub fn new(cargo_toml: CargoToml) -> Self
Sourcepub fn with_user<T>(self, user: T) -> Selfwhere
T: ToString,
pub fn with_user<T>(self, user: T) -> Selfwhere
T: ToString,
Create user on package installation
Sourcepub fn with_group<T>(self, group: T) -> Selfwhere
T: ToString,
pub fn with_group<T>(self, group: T) -> Selfwhere
T: ToString,
Create group on package installation
Sourcepub fn keep_file_after_removal<P>(self, path: P) -> Self
pub fn keep_file_after_removal<P>(self, path: P) -> Self
Save these files with .rpmsave suffix before removal
Sourcepub fn with_binary_destination<P>(self, path: P) -> Self
pub fn with_binary_destination<P>(self, path: P) -> Self
Save binary under different path than /usr/bin/
Sourcepub fn with_binary_filename<S>(self, name: S) -> Self
pub fn with_binary_filename<S>(self, name: S) -> Self
Save binary under different filename
Sourcepub fn with_binary_mode(self, mode: u16) -> Self
pub fn with_binary_mode(self, mode: u16) -> Self
Change mode of the binary. Default value is 0755
Sourcepub fn with_systemd_unit(self, path: PathBuf) -> Result<Self, Self>
pub fn with_systemd_unit(self, path: PathBuf) -> Result<Self, Self>
Automagically restarts the following units on reinstall. Reloads daemon on install
Sourcepub fn with_binary_src_archname<S>(self, name: S) -> Self
pub fn with_binary_src_archname<S>(self, name: S) -> Self
Use target/
Set this, if you are not using –release dir
pub fn with_sytemd_units<T, I>(self, paths: T) -> Result<Self, Self>
Sourcepub fn dont_include_binary(self) -> Self
pub fn dont_include_binary(self) -> Self
Flag to skip binary file automatic inclusion
pub fn builder(&self) -> Result<PackageBuilder, PackageError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Package
impl RefUnwindSafe for Package
impl Send for Package
impl Sync for Package
impl Unpin for Package
impl UnsafeUnpin for Package
impl UnwindSafe for Package
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