pub struct PlotSectorOptions<'a, RE, PG> {
pub public_key_hash: &'a Blake3Hash,
pub sector_index: SectorIndex,
pub piece_getter: &'a PG,
pub farmer_protocol_info: FarmerProtocolInfo,
pub erasure_coding: &'a ErasureCoding,
pub pieces_in_sector: u16,
pub sector_output: &'a mut Vec<u8>,
pub downloading_semaphore: Option<Arc<Semaphore>>,
pub encoding_semaphore: Option<&'a Semaphore>,
pub records_encoder: &'a mut RE,
pub abort_early: &'a AtomicBool,
}Expand description
Options for plotting a sector.
Sector output and sector metadata output should be either empty (in which case they’ll be resized to correct size automatically) or correctly sized from the beginning or else error will be returned.
Fields§
§public_key_hash: &'a Blake3HashPublic key corresponding to sector
sector_index: SectorIndexSector index
piece_getter: &'a PGGetter for pieces of archival history
farmer_protocol_info: FarmerProtocolInfoFarmer protocol info
erasure_coding: &'a ErasureCodingErasure coding instance
pieces_in_sector: u16How many pieces should sector contain
sector_output: &'a mut Vec<u8>Where plotted sector should be written, vector must either be empty (in which case it’ll be resized to correct size automatically) or correctly sized from the beginning
downloading_semaphore: Option<Arc<Semaphore>>Semaphore for part of the plotting when farmer downloads new sector, allows to limit memory usage of the plotting process, permit will be held until the end of the plotting process
encoding_semaphore: Option<&'a Semaphore>Semaphore for part of the plotting when farmer encodes downloaded sector, should typically allow one permit at a time for efficient CPU utilization
records_encoder: &'a mut REProof of space table generators
abort_early: &'a AtomicBoolWhether encoding should be aborted early
Trait Implementations§
Auto Trait Implementations§
impl<'a, RE, PG> Freeze for PlotSectorOptions<'a, RE, PG>
impl<'a, RE, PG> RefUnwindSafe for PlotSectorOptions<'a, RE, PG>where
PG: RefUnwindSafe,
RE: RefUnwindSafe,
impl<'a, RE, PG> Send for PlotSectorOptions<'a, RE, PG>
impl<'a, RE, PG> Sync for PlotSectorOptions<'a, RE, PG>
impl<'a, RE, PG> Unpin for PlotSectorOptions<'a, RE, PG>
impl<'a, RE, PG> !UnwindSafe for PlotSectorOptions<'a, RE, PG>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more