bytesize 2.3.1

Semantic wrapper for byte count representations
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use arbitrary::{Arbitrary, Unstructured};

use crate::ByteSize;

impl Arbitrary<'_> for ByteSize {
    fn arbitrary(u: &mut Unstructured<'_>) -> arbitrary::Result<Self> {
        Ok(ByteSize(u64::arbitrary(u)?))
    }

    fn size_hint(depth: usize) -> (usize, Option<usize>) {
        u64::size_hint(depth)
    }
}