pub trait ToText {
// Required method
fn to_text(&self, offset: usize, indent: usize) -> String;
}Expand description
A trait for converting value to a textual representation with provided offset and indentation.
Required Methods§
Sourcefn to_text(&self, offset: usize, indent: usize) -> String
fn to_text(&self, offset: usize, indent: usize) -> String
Converts the implementing type to a text representation.
The offset argument is the initial offset to be applied before the content.
The indent argument is the indentation to be used for formatting structured content.
Returns a String containing the textual representation of the implementing type.
§Example
use domrs::ToText;
impl ToText for MyStruct {
fn to_text(&self, offset: usize, indent: usize) -> String {
// Implementation logic comes here
String::new()
}
}