Skip to main content

Aggregate

Trait Aggregate 

Source
pub trait Aggregate:
    Sized
    + Send
    + Sync
    + 'static {
    const NAME: &'static str;
    const MODULE: &'static str;
    const FIELDS: &'static [Field];
    const OWNER: Option<&'static str> = None;
    const BEHAVIORS: &'static [&'static dyn Behavior] = _;
    const CHANGED: Option<&'static str> = None;
    const PRUNED: Option<&'static str> = None;
    const UNIQUE: &'static [&'static str] = _;
    const SENSITIVE: &'static [&'static str] = _;
    const ID: Column<Self, Id<Self>> = _;
    const CHILDREN: &'static [&'static ChildTable] = _;

    // Required methods
    fn meta(&self) -> &Meta;
    fn meta_mut(&mut self) -> &mut Meta;
    fn encode(&self, out: &mut Vec<SqlValue>);
    fn decode(meta: Meta, row: &mut dyn ColumnReader) -> Result<Self>;

    // Provided methods
    fn id(&self) -> Id<Self> { ... }
    fn owner(&self) -> Option<Uuid> { ... }
    fn owned_by(owner: Uuid) -> Option<Condition<Self>> { ... }
    fn children(&self) -> Vec<&dyn ChildRows> { ... }
    fn children_mut(&mut self) -> Vec<&mut dyn ChildRows> { ... }
    fn exposed_fields(&self) -> Option<Result<Map<String, Value>>> { ... }
    fn refuse_unlisted_moves(&self, loaded: &mut dyn ColumnReader) -> Result<()> { ... }
}

Required Associated Constants§

Source

const NAME: &'static str

Source

const MODULE: &'static str

Source

const FIELDS: &'static [Field]

Provided Associated Constants§

Source

const OWNER: Option<&'static str> = None

Source

const BEHAVIORS: &'static [&'static dyn Behavior] = _

Source

const CHANGED: Option<&'static str> = None

Source

const PRUNED: Option<&'static str> = None

Source

const UNIQUE: &'static [&'static str] = _

Fields held unique by the database, answered as their own field errors.

Source

const SENSITIVE: &'static [&'static str] = _

#[sensitive] fields, which a list can neither filter nor sort by.

Source

const ID: Column<Self, Id<Self>> = _

Source

const CHILDREN: &'static [&'static ChildTable] = _

Required Methods§

Source

fn meta(&self) -> &Meta

Source

fn meta_mut(&mut self) -> &mut Meta

Source

fn encode(&self, out: &mut Vec<SqlValue>)

Source

fn decode(meta: Meta, row: &mut dyn ColumnReader) -> Result<Self>

Provided Methods§

Source

fn id(&self) -> Id<Self>

Source

fn owner(&self) -> Option<Uuid>

Source

fn owned_by(owner: Uuid) -> Option<Condition<Self>>

Source

fn children(&self) -> Vec<&dyn ChildRows>

Source

fn children_mut(&mut self) -> Vec<&mut dyn ChildRows>

Source

fn exposed_fields(&self) -> Option<Result<Map<String, Value>>>

Source

fn refuse_unlisted_moves(&self, loaded: &mut dyn ColumnReader) -> Result<()>

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§