Module channel_map

Source
Expand description

This module provides functionality for working with bitsets and channel mapping.

A bitset is a data structure that efficiently stores a set of boolean values using bits. Each bit represents a boolean state (true/false) for a specific index or channel.

The module includes:

  • Generic Bitset trait for types that can represent sets of boolean values
  • CreateBitset trait for constructing bitsets from indices
  • Implementations for standard unsigned integer types (u8, u16, u32, u64, u128)
  • Slice-based implementation for working with arrays of bitsets
  • Type aliases for common channel map sizes (32, 64, and 128 bits)

§Example

use interflow::channel_map::Bitset;

let mut map = 0u32;
map.set_index(0, true);
map.set_index(5, true);
assert!(map.get_index(0));
assert!(map.get_index(5));
assert!(!map.get_index(1));

Traits§

Bitset
Trait for types which can represent bitsets.
CreateBitset
Trait for bitsets that can be created from indices

Type Aliases§

ChannelMap32
Type alias for a bitset with a capacity of 32 slots.
ChannelMap64
Type alias for a bitset with a capacity of 64 slots.
ChannelMap128
Type alias for a bitset with a capacity of 128 slots.