pub struct Solution<RewardAddress> {
    pub public_key: PublicKey,
    pub reward_address: RewardAddress,
    pub sector_index: SectorIndex,
    pub history_size: HistorySize,
    pub piece_offset: PieceOffset,
    pub record_commitment: RecordCommitment,
    pub record_witness: RecordWitness,
    pub chunk: ScalarBytes,
    pub chunk_witness: ChunkWitness,
    pub proof_of_space: PosProof,
}Expand description
Farmer solution for slot challenge.
Fields§
§public_key: PublicKeyPublic key of the farmer that created the solution
reward_address: RewardAddressAddress for receiving block reward
sector_index: SectorIndexIndex of the sector where solution was found
history_size: HistorySizeSize of the blockchain history at time of sector creation
piece_offset: PieceOffsetPieces offset within sector
record_commitment: RecordCommitmentRecord commitment that can use used to verify that piece was included in blockchain history
record_witness: RecordWitnessWitness for above record commitment
chunk: ScalarBytesChunk at above offset
chunk_witness: ChunkWitnessWitness for above chunk
proof_of_space: PosProofProof of space for piece offset
Implementations§
Trait Implementations§
Source§impl<RewardAddress> Decode for Solution<RewardAddress>where
    RewardAddress: Decode,
 
impl<RewardAddress> Decode for Solution<RewardAddress>where
    RewardAddress: Decode,
Source§fn decode<__CodecInputEdqy: Input>(
    __codec_input_edqy: &mut __CodecInputEdqy,
) -> Result<Self, Error>
 
fn decode<__CodecInputEdqy: Input>( __codec_input_edqy: &mut __CodecInputEdqy, ) -> Result<Self, Error>
Attempt to deserialise the value from input.
§fn decode_into<I>(
    input: &mut I,
    dst: &mut MaybeUninit<Self>,
) -> Result<DecodeFinished, Error>where
    I: Input,
 
fn decode_into<I>(
    input: &mut I,
    dst: &mut MaybeUninit<Self>,
) -> Result<DecodeFinished, Error>where
    I: Input,
Attempt to deserialize the value from input into a pre-allocated piece of memory. Read more
§fn skip<I>(input: &mut I) -> Result<(), Error>where
    I: Input,
 
fn skip<I>(input: &mut I) -> Result<(), Error>where
    I: Input,
Attempt to skip the encoded value from input. Read more
§fn encoded_fixed_size() -> Option<usize>
 
fn encoded_fixed_size() -> Option<usize>
Returns the fixed encoded size of the type. Read more
Source§impl<'de, RewardAddress> Deserialize<'de> for Solution<RewardAddress>where
    RewardAddress: Deserialize<'de>,
 
impl<'de, RewardAddress> Deserialize<'de> for Solution<RewardAddress>where
    RewardAddress: Deserialize<'de>,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
    __D: Deserializer<'de>,
 
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
    __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<RewardAddress> Encode for Solution<RewardAddress>where
    RewardAddress: Encode,
 
impl<RewardAddress> Encode for Solution<RewardAddress>where
    RewardAddress: Encode,
Source§fn size_hint(&self) -> usize
 
fn size_hint(&self) -> usize
If possible give a hint of expected size of the encoding. Read more
Source§fn encode_to<__CodecOutputEdqy: Output + ?Sized>(
    &self,
    __codec_dest_edqy: &mut __CodecOutputEdqy,
)
 
fn encode_to<__CodecOutputEdqy: Output + ?Sized>( &self, __codec_dest_edqy: &mut __CodecOutputEdqy, )
Convert self to a slice and append it to the destination.
§fn using_encoded<R, F>(&self, f: F) -> R
 
fn using_encoded<R, F>(&self, f: F) -> R
Convert self to a slice and then invoke the given closure with it.
§fn encoded_size(&self) -> usize
 
fn encoded_size(&self) -> usize
Calculates the encoded size. Read more
Source§impl<RewardAddress> TypeInfo for Solution<RewardAddress>where
    RewardAddress: TypeInfo + 'static,
 
impl<RewardAddress> TypeInfo for Solution<RewardAddress>where
    RewardAddress: TypeInfo + 'static,
impl<RewardAddress> EncodeLike for Solution<RewardAddress>where
    RewardAddress: Encode,
impl<RewardAddress: Eq> Eq for Solution<RewardAddress>
impl<RewardAddress> StructuralPartialEq for Solution<RewardAddress>
Auto Trait Implementations§
impl<RewardAddress> Freeze for Solution<RewardAddress>where
    RewardAddress: Freeze,
impl<RewardAddress> RefUnwindSafe for Solution<RewardAddress>where
    RewardAddress: RefUnwindSafe,
impl<RewardAddress> Send for Solution<RewardAddress>where
    RewardAddress: Send,
impl<RewardAddress> Sync for Solution<RewardAddress>where
    RewardAddress: Sync,
impl<RewardAddress> Unpin for Solution<RewardAddress>where
    RewardAddress: Unpin,
impl<RewardAddress> UnwindSafe for Solution<RewardAddress>where
    RewardAddress: UnwindSafe,
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
    T: Clone,
 
impl<T> CloneToUninit for Twhere
    T: Clone,
§impl<T> DecodeAll for Twhere
    T: Decode,
 
impl<T> DecodeAll for Twhere
    T: Decode,
§fn decode_all(input: &mut &[u8]) -> Result<T, Error>
 
fn decode_all(input: &mut &[u8]) -> Result<T, Error>
Decode 
Self and consume all of the given input data. Read more§impl<T> DecodeLimit for Twhere
    T: Decode,
 
impl<T> DecodeLimit for Twhere
    T: Decode,
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>
Converts 
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>
Converts 
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