pub trait Content: Any {
// Required method
fn to_string(&self, theme: &Theme) -> String;
}Expand description
A value that can be displayed as content in a tree node.
This trait is implemented for all types that can appear as leaf content or labels in a tree. It provides a way to convert a value to a colored string representation.
Required Methods§
Trait Implementations§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Implementors§
impl Content for Index
impl Content for Keyword
impl Content for Member
impl Content for TypeName
impl<T: Debug + Any> Content for T
Blanket implementation of Content for any Debug + Any type.
This provides automatic content conversion for most Rust types:
- Strings and
&strare displayed with string coloring - All other types are displayed with value coloring