pub trait Plotter: Debug {
// Required methods
fn has_free_capacity<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<bool, String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn plot_sector<'life0, 'async_trait>(
&'life0 self,
public_key: Ed25519PublicKey,
shard_commitments_root: ShardCommitmentHash,
sector_index: SectorIndex,
farmer_protocol_info: FarmerProtocolInfo,
pieces_in_sector: u16,
replotting: bool,
progress_sender: Sender<SectorPlottingProgress>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn try_plot_sector<'life0, 'async_trait>(
&'life0 self,
public_key: Ed25519PublicKey,
shard_commitments_root: ShardCommitmentHash,
sector_index: SectorIndex,
farmer_protocol_info: FarmerProtocolInfo,
pieces_in_sector: u16,
replotting: bool,
progress_sender: Sender<SectorPlottingProgress>,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Abstract plotter implementation
Required Methods§
Sourcefn has_free_capacity<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<bool, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn has_free_capacity<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<bool, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Whether plotter has free capacity to encode more sectors
Sourcefn plot_sector<'life0, 'async_trait>(
&'life0 self,
public_key: Ed25519PublicKey,
shard_commitments_root: ShardCommitmentHash,
sector_index: SectorIndex,
farmer_protocol_info: FarmerProtocolInfo,
pieces_in_sector: u16,
replotting: bool,
progress_sender: Sender<SectorPlottingProgress>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn plot_sector<'life0, 'async_trait>(
&'life0 self,
public_key: Ed25519PublicKey,
shard_commitments_root: ShardCommitmentHash,
sector_index: SectorIndex,
farmer_protocol_info: FarmerProtocolInfo,
pieces_in_sector: u16,
replotting: bool,
progress_sender: Sender<SectorPlottingProgress>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Plot one sector, sending sector plotting events via the provided stream.
Future returns once plotting is successfully scheduled (for backpressure purposes).
Sourcefn try_plot_sector<'life0, 'async_trait>(
&'life0 self,
public_key: Ed25519PublicKey,
shard_commitments_root: ShardCommitmentHash,
sector_index: SectorIndex,
farmer_protocol_info: FarmerProtocolInfo,
pieces_in_sector: u16,
replotting: bool,
progress_sender: Sender<SectorPlottingProgress>,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn try_plot_sector<'life0, 'async_trait>(
&'life0 self,
public_key: Ed25519PublicKey,
shard_commitments_root: ShardCommitmentHash,
sector_index: SectorIndex,
farmer_protocol_info: FarmerProtocolInfo,
pieces_in_sector: u16,
replotting: bool,
progress_sender: Sender<SectorPlottingProgress>,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Try to plot one sector, sending sector plotting events via the provided stream.
Returns true if plotting started successfully and false if there is no capacity to start
plotting immediately.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".