pub fn new(part: Parted<L, Vec<usize>>) -> Result<Self, InvalidPartitionError>
    {Ok({
        let index_limit = part.iter().map(|(_, v)| v.len()).sum();
        if !Self::validate_part(&part, index_limit) {
            return Err(InvalidPartitionError { _private: () })
        }
        Self { part, index_limit }
    })}
/// Create a partition that decomposes a vector entirely.
///
/// Every integer from 0 to the total length must appear once.
Create a partition that decomposes a vector entirely.
Every integer from 0 to the total length must appear once.
Create a partition that decomposes a vector entirely . Every integer from 0 to the total length must appear once .
pub fn new(part: Parted<L, Vec<usize>>) -> Result<Self, InvalidPartitionError>
    {Ok({
        let index_limit = part.iter().map(|(_, v)| v.len()).sum();
        if !Self::validate_part(&part, index_limit) {
            return Err(InvalidPartitionError { _private: () })
        }
        Self { part, index_limit }
    })}
pub fn new ( part : Parted < L , Vec < usize > > ) -> Result < Self , InvalidPartitionError > { Ok ( { let index_limit = part . iter ( ) . map ( | ( _ , v ) | v . len ( ) ) . sum ( ) ; if ! Self :: validate_part ( & part , index_limit ) { return Err ( InvalidPartitionError { _private : ( ) } ) } Self { part , index_limit } } ) }
Create a partition that decomposes a vector entirely.
Create a partition that decomposes a vector entirely .
part
Parted<L, Vec<usize>>
part
Parted<L, Vec<usize>>