Struct libalpm::Transaction
[−]
[src]
pub struct Transaction(_);
A transaction of package operations
Consumes an Alpm instance as only 1 transaction can be performed at a time. Use commit
or
rollback
to recover the Alpm instance.
Methods
impl Transaction
[src]
fn flags(&self) -> TransactionFlags
Returns the flags for the current transaction.
fn added_packages<'a>(&'a self) -> Vec<&'a PackageRef>
Gets packages added by the current transaction.
fn removed_packages<'a>(&'a self) -> Vec<&'a PackageRef>
Gets packages removed by the current transaction.
fn prepare<'a>(&'a self) -> AlpmResult<()>
Prepares a transaction for committing.
fn commit(self) -> Result<Alpm, (Error, Vec<()>, Transaction)>
Commits the transaction and returns the alpm instance. TODO conflict type
fn release(self) -> Result<Alpm, (Error, Alpm)>
Releases (discards) the transaction and returns the alpm instance.
fn sys_upgrade(&self, enable_downgrade: bool) -> AlpmResult<()>
Adds a system upgrade to this transaction.
fn add_package(&self, pkg: &PackageRef) -> AlpmResult<()>
Adds a new package to system in this transaction.
fn remove_package(&self, pkg: &PackageRef) -> AlpmResult<()>
Removes a package from the system in this transaction.