Struct forest_actor::miner::PartitionSectorMap[][src]

pub struct PartitionSectorMap(_);

Maps partitions to sector bitfields.

Implementations

impl PartitionSectorMap[src]

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

Records the given sectors at the given partition.

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

Records the given sector bitfield at the given partition index, merging it with any existing bitfields if necessary.

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

Counts the number of partitions & sectors within the map.

pub fn partitions(&self) -> Vec<u64>

Notable traits for Vec<u8, A>

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

Returns a sorted vec of partitions in the map.

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

Walks the partitions in the map, in order of increasing index.

pub fn len(&self) -> usize[src]

pub fn is_empty(&self) -> bool[src]

Trait Implementations

impl Default for PartitionSectorMap[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>,