Skip to main content

Memory

Trait Memory 

Source
pub(crate) trait Memory<'a> {
    // Required method
    fn for_each_segment<F>(&mut self, lanes: usize, f: F)
       where F: Fn(SegmentView<'_>, usize, usize) + Sync + Send;
}
Expand description

Extension trait for Argon2 memory blocks.

Required Methods§

Source

fn for_each_segment<F>(&mut self, lanes: usize, f: F)
where F: Fn(SegmentView<'_>, usize, usize) + Sync + Send,

Compute each Argon2 segment.

By default computation is single threaded. Parallel computation can be enabled with the parallel feature, in which case [rayon] is used to compute as many lanes in parallel as possible.

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.

Implementations on Foreign Types§

Source§

impl Memory<'_> for &mut [Block]

Source§

fn for_each_segment<F>(&mut self, lanes: usize, f: F)
where F: Fn(SegmentView<'_>, usize, usize) + Sync + Send,

Implementors§