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: PublicKey,
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: PublicKey,
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: PublicKey,
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: PublicKey,
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 provided stream.
Future returns once plotting is successfully scheduled (for backpressure purposes).
sourcefn try_plot_sector<'life0, 'async_trait>(
&'life0 self,
public_key: PublicKey,
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: PublicKey,
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 provided stream.
Returns true
if plotting started successfully and false
if there is no capacity to start
plotting immediately.