dove-core 0.1.1

The shared library behind dove — client-side-encrypted, expiring file sharing from a cloud you own.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! How dove-core reports progress without doing I/O: callers pass a `&dyn Progress`.
pub trait Progress {
    fn step(&self, label: &str);
    fn done(&self, label: &str);
    fn field(&self, key: &str, value: &str);
    fn bytes(&self, uploaded: u64, total: u64);
}

/// A no-op reporter for tests and non-interactive callers.
pub struct Silent;
impl Progress for Silent {
    fn step(&self, _: &str) {}
    fn done(&self, _: &str) {}
    fn field(&self, _: &str, _: &str) {}
    fn bytes(&self, _: u64, _: u64) {}
}