pub trait ModelDebug: 'static {
// Required methods
fn kind(&self) -> &'static str;
fn len(&self) -> usize;
fn debug_dump(&self, out: &mut dyn Write);
}Expand description
Type-erased debug view of a data model. Implementors live in
teksilo-data itself (ListModel, TreeModel, etc.); the inspector
uses these methods to render the Data Models tab without needing
to know T.
Required Methods§
Sourcefn kind(&self) -> &'static str
fn kind(&self) -> &'static str
Discriminator string — "ListModel", "TreeModel",
"SelectionModel", … Shown verbatim in the inspector.
Sourcefn debug_dump(&self, out: &mut dyn Write)
fn debug_dump(&self, out: &mut dyn Write)
Write a human-readable dump of the model’s items into out.
Each item should land on its own line. Best-effort; long
outputs may be truncated by callers.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".