icedwright 0.0.1

The icedwright test harness: run an iced 0.14 program headlessly on virtual time
Documentation
//! `sel!`, `chord!` and `keystroke!`: declarative wrappers that pass this crate's `$crate` to
//! the procedural macros in `icedwright-macros`, so the expansion names only paths under
//! `$crate::__private` and resolves in a crate that depends on `icedwright` alone.
//!
//! The crate root needs `mod macros;` and `#[doc(hidden)] pub use macros::__private;`, or,
//! if it has a `__private` module of its own, `pub use crate::macros::__private::*;` inside it.
//! `icedwright-remote` defines the same three macros and the same `__private` items.

/// A [`Locator`](icedwright_locator::Locator) from a selector string checked at compile time.
///
/// A syntax error, an unknown role or attribute, or an invalid regex fails the build with the
/// parser's message. The locator is typed by the last `role=` step, or an `as-role=` after it,
/// and is `Locator<AnyRole>` otherwise.
#[macro_export]
macro_rules! sel {
    ($selector:literal) => {
        $crate::__private::sel_impl!($crate, $selector)
    };
}

/// A [`Chord`](icedwright_types::Chord) checked at compile time, such as
/// `chord!(Ctrl + Shift + K)` or `chord!(ControlOrMeta + "é")`.
///
/// A misspelt name, a modifier in the last position, two keys or an empty chord fails the
/// build at the offending token, with the nearest names.
#[macro_export]
macro_rules! chord {
    ($($chord:tt)*) => {
        $crate::__private::chord_impl!($crate, $($chord)*)
    };
}

/// A single [`Keystroke`](icedwright_types::Keystroke) checked at compile time, such as
/// `keystroke!(Shift)` or `keystroke!(Code(KeyK))`, for pressing and releasing one key.
#[macro_export]
macro_rules! keystroke {
    ($($key:tt)*) => {
        $crate::__private::keystroke_impl!($crate, $($key)*)
    };
}

/// What the macros above expand to. Not a stable API.
#[doc(hidden)]
pub mod __private {
    pub use icedwright_locator::__private as locator;
    pub use icedwright_macros::{chord_impl, keystroke_impl, sel_impl};
    pub use icedwright_types as types;

    pub use crate::testing::support as testing;
}