bendy 0.6.1

A rust library for encoding and decoding bencode with enforced canonicalization rules.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#[cfg(not(feature = "std"))]
use core::fmt::Display;
#[cfg(feature = "std")]
use std::fmt::Display;

/// A value that can be formatted as a decimal integer
pub trait PrintableInteger: Display {}

macro_rules! impl_integer {
    ($($type:ty)*) => {$(
        impl PrintableInteger for $type {}
    )*}
}

impl_integer!(u8 u16 u32 u64 u128 usize i8 i16 i32 i64 i128 isize);