Trait fastsend::ConstructBlock[][src]

pub trait ConstructBlock: Sized {
    fn construct_block(n: usize, cursor: Cursor) -> Block<Self>
Notable traits for Block<T>
impl<T: Clone> Iterator for Block<T> type Item = T;
; }
Expand description

ConstructBlock 用于从 T 构建一个 Block,使用此方法可以快速构建一个包含 Block::SIZE 个元素的 Block<T>。 通常而言,在实现此方法时,需要先构建一个 [T; 8],再使用 new 或者 Into trait 完成对 Block<T> 的构建。

Required methods

n 代表是对 Block 的第 N 次创建, 0 <= n < BlockFrame::QUEUE_SIZE。cursor 代表当前的时间锚点。

Implementors