pub struct ExpirationSet {
    pub on_time_sectors: BitField,
    pub early_sectors: BitField,
    pub on_time_pledge: TokenAmount,
    pub active_power: PowerPair,
    pub faulty_power: PowerPair,
}
Expand description

ExpirationSet is a collection of sector numbers that are expiring, either due to expected “on-time” expiration at the end of their life, or unexpected “early” termination due to being faulty for too long consecutively. Note that there is not a direct correspondence between on-time sectors and active power; a sector may be faulty but expiring on-time if it faults just prior to expected termination. Early sectors are always faulty, and active power always represents on-time sectors.

Fields

on_time_sectors: BitField

Sectors expiring “on time” at the end of their committed life

early_sectors: BitField

Sectors expiring “early” due to being faulty for too long

on_time_pledge: TokenAmount

Pledge total for the on-time sectors

active_power: PowerPair

Power that is currently active (not faulty)

faulty_power: PowerPair

Power that is currently faulty

Implementations

Adds sectors and power to the expiration set in place.

Removes sectors and power from the expiration set in place.

A set is empty if it has no sectors. The power and pledge are not checked, but are expected to be zero.

Counts all sectors in the expiration set.

validates a set of assertions that must hold for expiration sets

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Deserialize this value from the given Serde deserializer. Read more

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.