#[repr(C)]pub struct ActionGroup { /* private fields */ }
Expand description
An action group is a group of actions that are currently being performed.
While an active group is active, certain routine clean-up actions that would normally be performed after every cache operation are delayed until the action group is completed. This is necessary primarily to avoid inefficiencies when modifying a large number of packages at once.
This struct represents an active action group. Creating an instance will create an action group; destroying one will destroy the corresponding action group.
The following operations are suppressed by this class:
- Keeping the Marked and Garbage flags up to date.
Here is an example of creating and releasing an ActionGroup.
use rust_apt::new_cache;
let cache = new_cache!().unwrap();
let mut action_group = unsafe { cache.depcache().action_group() };
// The C++ deconstructor will be run when the action group leaves scope.
// You can also call it explicitly.
action_group.pin_mut().release();
Implementations§
Source§impl ActionGroup
impl ActionGroup
Sourcepub fn release(self: Pin<&mut Self>)
pub fn release(self: Pin<&mut Self>)
This will release the ActionGroup
which will trigger a
MarkAndSweep
Trait Implementations§
Source§impl ExternType for ActionGroup
impl ExternType for ActionGroup
impl UniquePtrTarget for ActionGroup
Auto Trait Implementations§
impl !Freeze for ActionGroup
impl RefUnwindSafe for ActionGroup
impl !Send for ActionGroup
impl !Sync for ActionGroup
impl !Unpin for ActionGroup
impl UnwindSafe for ActionGroup
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