Function scale_bits::scale::encode_using_format
source · pub fn encode_using_format<I: ExactSizeIterator<Item = bool>>(
it: I,
format: Format
) -> Vec<u8>
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)
);