pub trait StructTable {
// Required method
fn data<O: StructTableOptions>(&self, config: &O) -> Vec<Option<String>>;
// Provided methods
fn class_headers<O: StructTableOptions>(_config: &O) -> Option<Vec<String>> { ... }
fn instance_headers<O: StructTableOptions>(
&self,
_config: &O,
) -> Option<Vec<String>> { ... }
fn status(&self) -> Option<String> { ... }
}
Expand description
Trait for building tables out of structures
Required Methods§
Provided Methods§
Sourcefn class_headers<O: StructTableOptions>(_config: &O) -> Option<Vec<String>>
fn class_headers<O: StructTableOptions>(_config: &O) -> Option<Vec<String>>
Return Vector of table headers (attribute titles to be returned) that are not instance specific (i.e. struct)
Sourcefn instance_headers<O: StructTableOptions>(
&self,
_config: &O,
) -> Option<Vec<String>>
fn instance_headers<O: StructTableOptions>( &self, _config: &O, ) -> Option<Vec<String>>
Return Vector of table headers (attribute titles to be returned) from the instance that are instance specific (i.e. HashMap)
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.