Skip to main content

ToRow

Trait ToRow 

Source
pub trait ToRow {
    // Required methods
    fn to_values(&self) -> Vec<Value>;
    fn column_names() -> &'static [&'static str];
}
Expand description

Trait for types that represent a database row

Required Methods§

Source

fn to_values(&self) -> Vec<Value>

Convert this struct to a vector of Values

Source

fn column_names() -> &'static [&'static str]

Get the column names for this row type

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.

Implementors§