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>> = _;
// 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 refuse_unlisted_moves(&self, loaded: &mut dyn ColumnReader) -> Result<()> { ... }
}Required Associated Constants§
Provided Associated Constants§
const OWNER: Option<&'static str> = None
const BEHAVIORS: &'static [&'static dyn Behavior] = _
const CHANGED: Option<&'static str> = None
const PRUNED: Option<&'static str> = None
Sourceconst UNIQUE: &'static [&'static str] = _
const UNIQUE: &'static [&'static str] = _
Fields held unique by the database, answered as their own field errors.
Sourceconst SENSITIVE: &'static [&'static str] = _
const SENSITIVE: &'static [&'static str] = _
#[sensitive] fields, which a list can neither filter nor sort by.
const ID: Column<Self, Id<Self>> = _
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 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".