Skip to main content

Fields

Trait Fields 

Source
pub trait Fields:
    Clone
    + Send
    + Sync
    + 'static {
    // Required methods
    fn columns() -> &'static [ColumnDef];
    fn decode(row: &Row) -> Result<Self, DecodeError>;
}
Expand description

A typed view over some columns of an existing table (user or session). The app’s .user_fields::<U>() and each plugin’s UserFields/SessionFields implement it. #[derive(Fields)] writes this.

Required Methods§

Source

fn columns() -> &'static [ColumnDef]

Source

fn decode(row: &Row) -> Result<Self, DecodeError>

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

Source§

impl Fields for ()

Implementors§