Skip to main content

cotis_modules_debug/
declaration_debugger.rs

1//! Debug wrappers that record UI declaration operations while building a live interface.
2//!
3//! Use the types in [`debug_element_configuring`] at the start of your [`UiFn::draw_in`](cotis::cotis_app::UiFn::draw_in)
4//! callback to mirror the normal [`cotis::element_configuring`] API while appending every
5//! `open`, `configure`, `close`, and leaf-config operation into a
6//! [`LeafedInterfaceDeclaration`](crate::serialize_targets::LeafedInterfaceDeclaration).
7//!
8//! # Usage pattern
9//!
10//! ```rust,ignore
11//! fn draw_in(&mut self, layout: &mut ConfiguredParentElement<'_, _, ConfigType>) {
12//!     let mut root = DebugInitialConfiguredParentElement::new(layout, &mut self.decl);
13//!     let mut element = root.new_element();
14//!     element.set_config(my_config);
15//!     // Drop or close_element records Close automatically
16//! }
17//! ```
18
19pub mod debug_element_configuring;