saturnus-objects 0.5.0

HP 48/49 RPL objects for saturnus hosts: the exact object decoder and a read-only view of a paused machine's user memory (directories, stack, flags)
Documentation
#![cfg_attr(test, allow(clippy::unwrap_used, clippy::expect_used))]
//! HP 48/49 RPL objects for saturnus hosts (the web page, a desktop shell,
//! the Kermit test host), without any I/O or protocol stack: builds for
//! `wasm32` like the core.
//!
//! - [`object`]: the typed object model ([`Object`], JSON through serde)
//!   and the exact decoder of the calculator's nibble format.
//! - [`ram`]: a read-only view of a paused machine's user memory: the
//!   HOME tree with each variable's type, size and checksum, the current
//!   directory, the data stack and the flags, straight from RAM (no Kermit
//!   server, no mode switch), plus a change counter for cheap polling.
//! - [`names`]: command names read at run time from the loaded ROM's own
//!   library tables ([`NameTable`], built once per ROM).
//! - [`decompile`]: the calculator's text for programs, algebraics, units
//!   and data objects in the display mode the flags select.
//! - [`prolog`]: object types by prolog and the size walk.
//! - [`cmdline`]: the command line being edited (text, cursor, open or
//!   not) and the editor's entry mode, alpha and shifts, from RAM.
//! - [`error`]: [`DecodeError`] (nibbles that are not an object, and
//!   where) and [`Error`] (everything else, such as memory the ROM has not
//!   set up yet).
//! - [`transfer`]: the objects of Kermit transfers: binary transfer files
//!   decoded and encoded, sources from ASCII transfers, RPL source text
//!   for host commands (the protocol itself is the host's).

pub mod charset;
pub mod cmdline;
pub mod decompile;
pub mod error;
pub mod menus;
pub mod names;
pub mod object;
pub mod prolog;
pub mod ram;
pub mod transfer;

pub use cmdline::{CommandLine, Editor, EditorLayout, command_line};
pub use decompile::{NumberFormat, Settings, described, display, has_text, text};
pub use error::{DecodeError, Error, Reason};
pub use names::{CommandInfo, NameStats, NameTable, UnitMarkers};
pub use object::{
    ArrayItem, Base, Graphic, Integer, MAX_CLONED_NIBBLES, MAX_DECODED_NIBBLES,
    MAX_DECODED_OBJECTS, Memory, NoMemory, Object, Reader, Real, decode, decode_at, graphic,
};
pub use prolog::ObjectType;
pub use ram::{
    Flags, Layout, UserMemory, Variable, change_counter, current_path, flags, memory_tree,
    stack_objects,
};

// The README (the crate's page on crates.io) compiles as a doctest.
#[cfg(doctest)]
#[doc = include_str!("../README.md")]
struct ReadmeDoctests;