Module farm

Source
Expand description

Abstract farm API

This module provides a bunch of traits and simple data structures that serve as a layer of abstraction that improves composition without having assumptions about implementation details.

Implementations can be local (backed by local disk) and remote (connected via network in some way). This crate provides a few of such implementations, but more can be created externally as well if needed without modifying the library itself.

Modules§

plotted_pieces
Wrapper for pieces plotted under multiple plots

Structs§

AuditingDetails
Auditing details
DecodedFarmingError
Special decoded farming error
PieceCacheOffset
Offset wrapper for pieces in PieceCache
ProvingDetails
Proving details

Enums§

FarmId
An identifier for a farm, can be used for in logs, thread names, etc.
FarmingError
Errors that happen during farming
FarmingNotification
Various farming notifications
MaybePieceStoredResult
Result of piece storing check
PieceCacheId
An identifier for a cache, can be used for in logs, thread names, etc.
ProvingResult
Result of the proving
SectorExpirationDetails
Details about sector expiration
SectorPlottingDetails
Details about sector currently being plotted
SectorUpdate
Various sector updates

Traits§

Farm
Abstract farm implementation
HandlerId
Opaque handler ID for event handlers, once dropped handler will be removed automatically
PieceCache
Abstract piece cache implementation.
PieceReader
Abstract piece reader implementation
PlotCache
Abstract plot cache implementation.
PlottedSectors
Getter for plotted sectors

Type Aliases§

FarmError
Erased error type
HandlerFn
Type alias used for event handlers