Skip to main content

ToTableString

Trait ToTableString 

Source
pub trait ToTableString {
    // Required method
    fn to_table_string_custom(
        &self,
        columns: usize,
        indent: usize,
        brackets: bool,
        newlines: bool,
    ) -> String;

    // Provided method
    fn to_table_string(&self) -> String { ... }
}
Expand description

Trait for printing values in a human-readable table format

Required Methods§

Source

fn to_table_string_custom( &self, columns: usize, indent: usize, brackets: bool, newlines: bool, ) -> String

Format with explicit column count, indent, bracketing, and line-wrapping.

Provided Methods§

Source

fn to_table_string(&self) -> String

Format with default layout (32 columns, 4-space indent, brackets, newlines).

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T> ToTableString for Vec<T>
where T: Display,

Source§

fn to_table_string_custom( &self, columns: usize, indent: usize, brackets: bool, newlines: bool, ) -> String

Implementors§