encode_using_format

Function encode_using_format 

Source
pub fn encode_using_format<I>(it: I, format: Format) -> Vec<u8> 
where I: ExactSizeIterator<Item = bool>,
Expand description

This is a convenience wrapper around encode_using_format_to.

§Example

use scale_bits::scale::{
    encode_using_format,
    format::{ Format, StoreFormat, OrderFormat },
};

let bits = vec![true, true, false, true];
let encoded = encode_using_format(
    bits.into_iter(),
    Format::new(StoreFormat::U8, OrderFormat::Msb0)
);