pub fn stream_index(stream_id: &StreamId, max_streams: usize) -> usize
Maps a stream ID to an index within the pool’s capacity using modulo arithmetic.