add coded item to generated dex

This commit is contained in:
Jean-Marie Mineau 2023-12-06 10:58:07 +01:00
parent 3468bc0463
commit 53d321c7fe
Signed by: histausse
GPG key ID: B66AEEDA9B645AD2
5 changed files with 797 additions and 35 deletions

View file

@ -1,19 +1,20 @@
//! The implementation of serializable for LEB128 types.
use std::hash::Hash;
use std::io::Write;
use crate::{Error, ReadSeek, Result, Serializable};
/// Signed LEB128, variable-length
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct Sleb128(pub i32);
/// Unsigned LEB128, variable-length
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct Uleb128(pub u32);
/// Unsigned LEB128 plus 1, variable-length
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct Uleb128p1(pub u32);
impl Sleb128 {