WIP mutf8
This commit is contained in:
parent
d44e2b624b
commit
24f4b0b46d
3 changed files with 459 additions and 2 deletions
|
|
@ -6,13 +6,16 @@ use std::io::{Cursor, Read, Seek, SeekFrom, Write};
|
|||
pub use androscalpel_serializer_derive::*;
|
||||
|
||||
pub mod leb;
|
||||
pub mod string;
|
||||
pub use leb::*;
|
||||
pub use string::*;
|
||||
|
||||
#[derive(Debug, PartialEq, Eq)]
|
||||
pub enum Error {
|
||||
InputTooSmall(String), // TODO: find a better name
|
||||
SerializationError(String),
|
||||
DeserializationError(String),
|
||||
InvalidStringEncoding(String),
|
||||
}
|
||||
|
||||
pub type Result<T> = core::result::Result<T, Error>;
|
||||
|
|
@ -26,6 +29,7 @@ impl std::fmt::Display for Error {
|
|||
Self::InputTooSmall(msg) => write!(f, "Error: {}", msg),
|
||||
Self::SerializationError(msg) => write!(f, "Error: {}", msg),
|
||||
Self::DeserializationError(msg) => write!(f, "Error: {}", msg),
|
||||
Self::InvalidStringEncoding(msg) => write!(f, "Error: {}", msg),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue