pub type Blockies<const S: usize, T = ()> = [[T; S]; S];Expand description
Ethereum-style blockies data of type T
An alias type of square 2d-array
§Generic Parameters
S(const) - Size of blockies data (number of elements in both width and height)- Equal to the
sizeargument in other blockies implementation.
- Equal to the
T- Type of each element
Trait Implementations§
Source§impl<const S: usize> BlockiesGenerator<S> for Blockies<S>
impl<const S: usize> BlockiesGenerator<S> for Blockies<S>
Source§fn data<I: SeedInput>(seed: I) -> Blockies<S, RgbPixel>
fn data<I: SeedInput>(seed: I) -> Blockies<S, RgbPixel>
Generate an Ethereum-style blockies data Read more
Source§fn data_mapped<I: SeedInput, T: Clone, F: Fn(RgbPixel) -> T>(
seed: I,
map_fn: F,
) -> Blockies<S, T>
fn data_mapped<I: SeedInput, T: Clone, F: Fn(RgbPixel) -> T>( seed: I, map_fn: F, ) -> Blockies<S, T>
Generate an Ethereum-style blockies data, mapping each RGB color with
map_fn Read moreSource§fn indexed_data<I: SeedInput>(seed: I) -> (RgbPalette, Blockies<S, ColorClass>)
fn indexed_data<I: SeedInput>(seed: I) -> (RgbPalette, Blockies<S, ColorClass>)
Generate an Ethereum-style blockies data in indexed image format Read more
Source§fn indexed_data_mapped<I: SeedInput, T: Clone, F: Fn(RgbPixel) -> T>(
seed: I,
map_fn: F,
) -> (Palette<T>, Blockies<S, ColorClass>)
fn indexed_data_mapped<I: SeedInput, T: Clone, F: Fn(RgbPixel) -> T>( seed: I, map_fn: F, ) -> (Palette<T>, Blockies<S, ColorClass>)
Generate an Ethereum-style blockies data in indexed image format, mapping each RGB palette color with
map_fn Read moreSource§fn ansiseq_data<I: SeedInput>(
seed: I,
output_dim: (usize, usize),
is_utf8: bool,
) -> Vec<String>
fn ansiseq_data<I: SeedInput>( seed: I, output_dim: (usize, usize), is_utf8: bool, ) -> Vec<String>
Generate an Ethereum-style blockies data in ANSI sequence format (terminal-printable) Read more
Source§fn png_data<I: SeedInput>(seed: I, output_dim: (usize, usize)) -> Vec<u8> ⓘ
fn png_data<I: SeedInput>(seed: I, output_dim: (usize, usize)) -> Vec<u8> ⓘ
Generate an Ethereum-style blockies data in uncompressed indexed png format Read more
Source§fn compressed_png_data<I: SeedInput>(
seed: I,
output_dim: (usize, usize),
) -> Vec<u8> ⓘ
fn compressed_png_data<I: SeedInput>( seed: I, output_dim: (usize, usize), ) -> Vec<u8> ⓘ
Available on crate feature
compressed_png only.Generate an Ethereum-style blockies data in compressed indexed png format Read more