vecdb 0.10.2

High-performance mutable persistent vectors built on rawdb
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use std::ops::Div;

use super::UnaryTransform;

/// v -> v / 2
pub struct Halve;

impl<T: Div<i64, Output = T>> UnaryTransform<T> for Halve {
    #[inline(always)]
    fn apply(value: T) -> T {
        value / 2
    }
}