pub struct PlotSectorOptions<'a, RE, PG> {
pub public_key_hash: &'a Blake3Hash,
pub shard_commitments_root: &'a ShardCommitmentHash,
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 OwnedAlignedBuffer<Align4096>,
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 should be either empty (in which case it’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
shard_commitments_root: &'a ShardCommitmentHashRoot of the Merkle Tree of shard commitments
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 OwnedAlignedBuffer<Align4096>Where plotted sector should be written, buffer must either be empty (in which case it’ll be resized to correct size automatically) or correctly sized from the beginning.
Contents of the buffer are aligned to the page size, so the sector can be written to disk with direct I/O.
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> !UnwindSafe for PlotSectorOptions<'a, RE, PG>
impl<'a, RE, PG> Forget for PlotSectorOptions<'a, RE, PG>
impl<'a, RE, PG> Freeze for PlotSectorOptions<'a, RE, PG>where
&'a Blake3Hash: Freeze,
&'a ShardCommitmentHash: Freeze,
&'a PG: Freeze,
&'a ErasureCoding: Freeze,
&'a mut OwnedAlignedBuffer<Align<4096>>: Freeze,
*const ArcInner<Semaphore> is !null: Freeze,
PhantomData<ArcInner<Semaphore>>: Freeze,
&'a Semaphore: Freeze,
&'a mut RE: Freeze,
&'a Atomic<bool>: Freeze,
impl<'a, RE, PG> Move for PlotSectorOptions<'a, RE, PG>
impl<'a, RE, PG> RefUnwindSafe for PlotSectorOptions<'a, RE, PG>where
PG: RefUnwindSafe,
Atomic<usize>: RefUnwindSafe,
Event: RefUnwindSafe,
RE: RefUnwindSafe,
Atomic<bool>: 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> UnsafeUnpin for PlotSectorOptions<'a, RE, PG>where
&'a Blake3Hash: UnsafeUnpin,
&'a ShardCommitmentHash: UnsafeUnpin,
&'a PG: UnsafeUnpin,
&'a ErasureCoding: UnsafeUnpin,
&'a mut OwnedAlignedBuffer<Align<4096>>: UnsafeUnpin,
*const ArcInner<Semaphore> is !null: UnsafeUnpin,
PhantomData<ArcInner<Semaphore>>: UnsafeUnpin,
&'a Semaphore: UnsafeUnpin,
&'a mut RE: UnsafeUnpin,
&'a Atomic<bool>: UnsafeUnpin,
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§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