[][src]Trait butane_core::DataResult

pub trait DataResult: Sized {
    type DBO: DataObject;

    pub const COLUMNS: &'static [Column];

    pub fn from_row(row: Row) -> Result<Self>
    where
        Self: Sized
;
pub fn query() -> Query<Self>; }

A type which may be the result of a database query.

Every result type must have a corresponding object type and the columns of the result type must be a subset of the columns of the object type. The purpose of a result type which is not also an object type is to allow a query to retrieve a subset of an object's columns.

Associated Types

type DBO: DataObject[src]

Corresponding object type.

Loading content...

Associated Constants

Loading content...

Required methods

pub fn from_row(row: Row) -> Result<Self> where
    Self: Sized
[src]

pub fn query() -> Query<Self>[src]

Create a blank query (matching all rows) for this type.

Loading content...

Implementors

Loading content...