ToText

Trait ToText 

Source
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§

Source

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()
    }
}

Implementors§