Struct forest_actor::miner::DeadlineSectorMap[][src]

pub struct DeadlineSectorMap(_);

Maps deadlines to partition maps.

Implementations

impl DeadlineSectorMap[src]

pub fn new() -> Self[src]

pub fn check(
    &mut self,
    max_partitions: u64,
    max_sectors: u64
) -> Result<(), String>
[src]

Check validates all bitfields and counts the number of partitions & sectors contained within the map, and returns an error if they exceed the given maximums.

pub fn count(&mut self) -> Result<(u64, u64), String>[src]

Counts the number of partitions & sectors within the map.

pub fn add(
    &mut self,
    deadline_idx: usize,
    partition_idx: usize,
    sector_numbers: UnvalidatedBitField
) -> Result<(), String>
[src]

Records the given sector bitfield at the given deadline/partition index.

pub fn add_values(
    &mut self,
    deadline_idx: usize,
    partition_idx: usize,
    sector_numbers: &[u64]
) -> Result<(), String>
[src]

Records the given sectors at the given deadline/partition index.

pub fn deadlines(&self) -> Vec<usize>

Notable traits for Vec<u8, A>

impl<A> Write for Vec<u8, A> where
    A: Allocator
[src]

Returns a sorted vec of deadlines in the map.

pub fn iter(
    &mut self
) -> impl Iterator<Item = (usize, &mut PartitionSectorMap)> + '_
[src]

Walks the deadlines in deadline order.

Trait Implementations

impl Default for DeadlineSectorMap[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,