blockset-lib 0.7.0

BLOCKSET internal library
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use std::io::{self, Read, Seek};

#[derive(Debug, Clone, Copy)]
pub struct State {
    pub total: u64,
    pub current: u64,
}

pub trait Progress {
    fn position(&mut self) -> io::Result<u64>;
}

impl<T: Read + Seek> Progress for T {
    fn position(&mut self) -> io::Result<u64> {
        self.stream_position()
    }
}