read_range 0.2.1

A portable and efficient crate for reading a specific range of bytes from a file. Provides both sync/async APIs and uses concurrent-safe positional I/O.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#![doc = include_str!("../README.md")]
#![deny(unsafe_code)]

#[cfg(not(target_family = "wasm"))]
pub mod read_at;

#[cfg(not(target_family = "wasm"))]
pub use read_at::*;

/// Progress trait for monitoring read operations.
#[cfg(not(target_family = "wasm"))]
pub trait Progress {
    /// Increase progress by `delta` bytes.
    fn inc(&self, delta: u64);
    /// Signal that the read has finished (success or error).
    fn finish(&self);
}