containerization-framework 0.3.0

Rust bindings for Apple's Containerization framework: Linux containers in lightweight VMs, in-process and without a daemon.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//! `ProgressEvent`, and the `ProgressHandler` that receives them.

/// `ProgressEvent`.
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum ProgressEvent {
  AddItems(isize),
  AddTotalItems(isize),
  AddSize(i64),
  AddTotalSize(i64),
}

/// `ProgressHandler`. Swift calls it with a batch of events, from any thread,
/// and possibly from several at once.
pub type ProgressHandler = Box<dyn Fn(&[ProgressEvent]) + Send + Sync>;