pub trait BlockStream:
Sized
+ Clone
+ ReprC {
type BlockType: AsRef<[u8]> + ReprC + Clone;
const BLOCK_SIZE: u32;
// Required method
fn next_block(&mut self) -> Self::BlockType;
}
Expand description
Represents a stream of blocks. These are easily convertible
into PRNGs through the BlockPRNG
wrapper.
Required Associated Constants§
Sourceconst BLOCK_SIZE: u32
const BLOCK_SIZE: u32
The size of the block in bytes.
Required Associated Types§
Required Methods§
Sourcefn next_block(&mut self) -> Self::BlockType
fn next_block(&mut self) -> Self::BlockType
Generates the next block.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.