#![allow(unknown_lints)]
#![deny(clippy::all)]
#![deny(
missing_docs,
missing_copy_implementations,
missing_debug_implementations
)]
use std::{fs::File, io::Cursor, path::Path};
mod deserialization;
mod error;
mod pyxel;
pub use crate::error::PyxelError;
pub use crate::pyxel::*;
pub fn load_from_memory(buf: &[u8]) -> Result<Pyxel, PyxelError> {
let cursor = Cursor::new(buf);
load(cursor)
}
pub fn open<P>(path: P) -> Result<Pyxel, PyxelError>
where
P: AsRef<Path>,
{
let file = File::open(path)?;
load(file)
}