icedwright-types 0.1.0

Shared types for icedwright: roles and capabilities, pixel units, virtual time, frames, key chords and the Messages trait
Documentation
//! Types shared by every icedwright crate, including the featureless probe that apps link.
//!
//! - [`role`]: the runtime [`Role`] enum, one marker type per role, and the sealed capability
//!   traits that gate role-specific methods at compile time.
//! - [`geometry`] and [`units`]: points, vectors, sizes and rectangles, and the [`Logical`] and
//!   [`Physical`] pixel newtypes with [`ScaleFactor`] between them.
//! - [`time`]: [`VirtualInstant`] and [`VirtualDuration`], which never mix with the real clock.
//! - [`frame`]: [`Frame`], an RGBA image at physical pixels.
//! - [`input`]: key chords, their grammar and its parser.
//! - [`messages`]: the [`Messages`] trait that `#[derive(Messages)]` implements.
//! - [`state`]: [`StateName`], [`StateValue`], [`Checked`] and [`CursorSeen`], the node states
//!   trees, YAML and selectors share.
//!
//! The `serde` feature derives serialisation for the types that cross the wire. The `iced`
//! feature adds `From` conversions to and from `iced_core` types.

#![forbid(unsafe_code)]
#![deny(missing_docs)]
#![warn(clippy::must_use_candidate, clippy::return_self_not_must_use)]

pub mod frame;
pub mod geometry;
#[cfg(feature = "iced")]
mod iced;
pub mod input;
pub mod messages;
pub mod role;
pub mod state;
mod suggest;
pub mod time;
pub mod units;

pub use frame::{Frame, FrameError};
pub use geometry::{Point, Rect, Size, Vector};
pub use input::{Chord, ChordError, Keystroke, ModifierSet};
pub use messages::{Messages, VariantPath};
pub use role::{ParseRoleError, Role, RoleMismatch};
pub use state::{Checked, CursorSeen, ParseStateError, StateName, StateValue};
pub use time::{VirtualDuration, VirtualInstant};
pub use units::{InvalidRatio, InvalidScaleFactor, Logical, Physical, Ratio, ScaleFactor};