pub trait PieceDataProvider: Send + Sync {
// Required methods
fn get_piece_data(
&self,
piece_index: u32,
offset: u32,
length: u32,
) -> Option<Vec<u8>>;
fn has_piece(&self, piece_index: u32) -> bool;
fn num_pieces(&self) -> u32;
}Required Methods§
fn get_piece_data( &self, piece_index: u32, offset: u32, length: u32, ) -> Option<Vec<u8>>
fn has_piece(&self, piece_index: u32) -> bool
fn num_pieces(&self) -> u32
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".