TableRecord

Trait TableRecord 

Source
pub trait TableRecord: CandidType + for<'de> Deserialize<'de> {
    type Schema: TableSchema<Record = Self>;

    // Required methods
    fn from_values(values: TableColumns) -> Self;
    fn to_values(&self) -> Vec<(ColumnDef, Value)>;
}
Expand description

This trait represents a record returned by a crate::dbms::query::Query for a table.

Required Associated Types§

Source

type Schema: TableSchema<Record = Self>

The table schema associated with this record.

Required Methods§

Source

fn from_values(values: TableColumns) -> Self

Constructs TableRecord from a list of column values grouped by table.

Source

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

Converts the record into a list of column Values.

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§