Crates.io | osrs-buffer |
lib.rs | osrs-buffer |
version | 0.7.0 |
source | src |
created_at | 2021-12-27 23:20:45.816873 |
updated_at | 2022-12-31 10:33:54.769177 |
description | A buffer for the data types in Oldschool Runescape. |
homepage | |
repository | https://github.com/runecore/osrs-buffer |
max_upload_size | |
id | 503914 |
size | 27,725 |
A buffer for Oldschool Runescape data types.
This crate has been deprecated in favor of osrs-bytes. osrs-buffer
will not be updated anymore.
Add this crate as a dependency to your Cargo.toml
file.
[dependencies]
osrs-buffer = "0.7.0"
use osrs_buffer::{ReadExt, WriteExt};
use std::io::{self, Cursor};
fn main() -> Result<(), io::Error> {
// Read data from the cursor
let mut csr = Cursor::new(vec![123]);
assert_eq!(csr.read_i8()?, 123);
// Write data to the vector
let mut vec = Vec::new();
vec.write_i8(124)?;
assert_eq!(vec[0], 124);
Ok(())
}
This project is licensed under the MIT license.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in osrs-buffer
by you, shall be licensed as MIT, without any additional terms or conditions.