Function reed_solomon_erasure::option_shards_to_shards
[−]
[src]
pub fn option_shards_to_shards(
shards: &Vec<Option<Shard>>,
start: Option<usize>,
count: Option<usize>
) -> Vec<Shard>
Transforms a section of vector of option shards to vector of shards.
Arguments
start
- start of range of option shards you want to usecount
- number of option shards you want to use
Remarks
Each shard is cloned rather than moved, which may be slow.
This is mainly useful when you want to convert result of
decode_missing
to the more usable arrangement.
Panics when any of the shards is missing or the range exceeds number of shards provided.